FileDocCategorySizeDatePackage
CharArrayWriterTest.javaAPI DocAndroid 1.5 API1518Wed May 06 22:42:02 BST 2009android.core

CharArrayWriterTest

public class CharArrayWriterTest extends TestCase
Basic tests for CharArrayWriter.

Fields Summary
Constructors Summary
Methods Summary
public voidtestCharArrayWriter()

        String str = "AbCdEfGhIjKlMnOpQrStUvWxYz";
        CharArrayWriter a = new CharArrayWriter();
        CharArrayWriter b = new CharArrayWriter();

        a.write(str, 0, 26);
        a.write('X");
        a.writeTo(b);

        assertEquals(27, a.size());
        assertEquals("AbCdEfGhIjKlMnOpQrStUvWxYzX", a.toString());

        b.write("alphabravodelta", 5, 5);
        b.append('X");
        assertEquals("AbCdEfGhIjKlMnOpQrStUvWxYzXbravoX", b.toString());
        b.append("omega");
        assertEquals("AbCdEfGhIjKlMnOpQrStUvWxYzXbravoXomega", b.toString());