Code example for CharArrayReader

Methods: read, ready

0
    /** 
     * java.io.CharArrayReader#CharArrayReader(char[], int, int) 
     */ 
    public void test_Constructor$CII() throws IOException { 
        try { 
            cr = new CharArrayReader(null, 0, 0);
            fail("Test 1: NullPointerException expected.");
        } catch (NullPointerException e) {
            // Expected. 
        } 
        try { 
            cr = new CharArrayReader(hw, -1, 0);
            fail("Test 2: IllegalArgumentException expected.");
        } catch (IllegalArgumentException e) {
            // Expected. 
        } 
        try { 
            cr = new CharArrayReader(hw, 0, -1);
            fail("Test 3: IllegalArgumentException expected.");
        } catch (IllegalArgumentException e) {
            // Expected.