Code example for BreakIterator

Methods: preceding, setText

0
        try { 
            new MockBreakIterator(); 
        } catch (Exception e) {
            fail("Unexpected exception " + e.toString());
        } 
    } 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "first", 
        args = {} 
    ) 
    public void testFirst() { 
        assertEquals(0, iterator.first());
        iterator.setText(TEXT);
        assertEquals(0, iterator.first());
    } 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "following", 
        args = {int.class} 
    ) 
    public void testFollowing() { 
        try { 
            iterator.following(1);
            fail("should throw illegal argument exception");