Code example for CharArrayWriter

Methods: writewriteTo

    public void test_writeToLjava_io_Writer() throws IOException { 
        cw.write("HelloWorld", 0, 10);
        StringWriter sw = new StringWriter();
        assertEquals("Writer failed to write correct chars", "HelloWorld", sw
     * Sets up the fixture, for example, open a network connection. This method 
     * is called before a test is executed. 
    protected void setUp() { 
        cw = new CharArrayWriter();
     * Tears down the fixture, for example, close a network connection. This 
     * method is called after a test is executed.