FileDocCategorySizeDatePackage
StringWriterTest.javaAPI DocAndroid 1.5 API1352Wed May 06 22:42:02 BST 2009android.core

StringWriterTest

public class StringWriterTest extends TestCase

Fields Summary
Constructors Summary
Methods Summary
public voidtestStringWriter()

        String str = "AbCdEfGhIjKlMnOpQrStUvWxYz";
        StringWriter a = new StringWriter(10);

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

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

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