Code example for StringBufferInputStream

Methods: readresetskip

0
	/** 
	 * @tests java.io.StringBufferInputStream#reset() 
	 */ 
	public void test_reset() { 
		// Test for method void java.io.StringBufferInputStream.reset() 
		long s = sbis.skip(6);
		assertEquals("Unable to skip correct umber of chars", 6, s);
		sbis.reset();
		assertEquals("Failed to reset", 'H', sbis.read());
	} 
 
	/** 
	 * @tests java.io.StringBufferInputStream#skip(long) 
	 */ 
	public void test_skipJ() { 
		// Test for method long java.io.StringBufferInputStream.skip(long) 
		long s = sbis.skip(6);
		assertEquals("Unable to skip correct umber of chars", 6, s);
		assertEquals("Skip positioned at incorrect char", 'W', sbis.read());
	}