Code example for ArrayList

Methods: addAll, size

0
        spec.addTransition(q0, q1, new EpsilonTransitionLabel());
        spec.addTransition(q1, q2, new EpsilonTransitionLabel());
        spec.addTransition(q0, q3, new EndOfTextOrLineTransitionLabel());
        spec.addTransition(q2, q4, new EndOfTextOrLineTransitionLabel());
 
        List<State> expectedList = new ArrayList<State>();
        expectedList.addAll(spec.allStates());
        assertEquals(expectedList.size(),
                spec.getEpsilonClosureWithContext(q0, "s", 1).size());
        assertFalse(expectedList.size()
             == spec.getEpsilonClosureWithContext(q1, "s", 1).size());
    } 
 
    //Testy do nierozwiazanego jeszcze zadania (#223). 
    /** 
     * Test metody makeAutomatonFromScheme. 
     */ 
    /* 
    public final void testmakeAutomatonFromSimpleScheme () { 
        AutomatonSpecification spec = new NaiveAutomatonSpecification(); 
        NondeterministicAutomatonByThompsonApproach automaton =