Code example for AttributedString

Methods: getIterator

0
     *        java.text.AttributedString#getIterator(). 
     */ 
    public void test_getIterator() { 
        String test = "Test string";
        try { 
            AttributedString attrString = new AttributedString(test);
            AttributedCharacterIterator it = attrString.getIterator();
            assertEquals("Incorrect iteration on AttributedString", it.first(),
                    test.charAt(0));
        } catch (Exception e) {
            fail("Unexpected exceptiption " + e.toString());
        } 
    } 
 
    /** 
     * @tests java.text.AttributedString#getIterator(AttributedCharacterIterator.Attribute[]) 
     *        Test of method 
     *        java.text.AttributedString#getIterator(AttributedCharacterIterator.Attribute[]). 
     */ 
    public void test_getIterator$Ljava_text_AttributedCharacterIterator$Attribute() { 
        String test = "Test string";