Code example for StringCharacterIterator

Methods: getIndex, next, previous

0
        args = {} 
    ) 
    public void testGetIndex() { 
        StringCharacterIterator fixture = new StringCharacterIterator("fixture");
        assertEquals(0, fixture.getIndex());
        fixture = new StringCharacterIterator("fixture", 1);
        assertEquals(1, fixture.getIndex());
        fixture = new StringCharacterIterator("fixture", 1, "fixture".length(),
                2); 
        assertEquals(2, fixture.getIndex());
        fixture = new StringCharacterIterator("fixture", 1, 4, 2);
        assertEquals(2, fixture.getIndex());
    } 
 
    /** 
     * @tests java.text.StringCharacterIterator.last() 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "last", 
        args = {} 
    ) 
    public void testLast() { 
        StringCharacterIterator fixture = new StringCharacterIterator("fixture");
        assertEquals('e', fixture.last());
        fixture.next();
        assertEquals('e', fixture.last());
        fixture = new StringCharacterIterator("fixture", 1);
        assertEquals('e', fixture.last());
        fixture = new StringCharacterIterator("fixture", 1, "fixture".length(),
                2); 
        assertEquals('e', fixture.last());
        fixture = new StringCharacterIterator("fixture", 1, 4, 2);
        assertEquals('t', fixture.last());
    } 
 
    /**