Code example for StringCharacterIterator

Methods: current, last, setText

0
        assertTrue("Wrong next char4", it1.next() == CharacterIterator.DONE);
        int index = it1.getIndex();
        assertEquals("Wrong index", 6, index);
        assertTrue("Wrong current char",
                it1.current() == CharacterIterator.DONE);
    } 
 
    /** 
     * @tests java.text.StringCharacterIterator.previous() 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "previous", 
        args = {} 
    ) 
    public void test_previous() { 
        StringCharacterIterator fixture = new StringCharacterIterator("fixture");
        assertEquals(CharacterIterator.DONE, fixture.previous());
        assertEquals('i', fixture.next());
        assertEquals('x', fixture.next());