use of javax.sql.rowset.serial.SerialClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test06.
/*
* Validate calling getAsciiStream() after calling free() throws an
* SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test06() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
sc.free();
sc.getAsciiStream();
}
use of javax.sql.rowset.serial.SerialClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test03.
/*
* Validate calling getCharacterStream() after calling free() throws an
* SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test03() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
sc.free();
sc.getCharacterStream(1, 5);
}
use of javax.sql.rowset.serial.SerialClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test12.
/*
* Validate calling setString() after calling free() throws an
* SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test12() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
sc.free();
sc.setString(1, "hello");
}
use of javax.sql.rowset.serial.SerialClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test21.
/*
* Validate that a getCharacterStream() returns an Reader when a Clob is
* used to create the SerialClob
*/
@Test
public void test21() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
Reader is = sc.getCharacterStream();
assertTrue(is != null);
}
use of javax.sql.rowset.serial.SerialClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test24.
/*
* Validate that a getSubString() returns the correct value when a Clob is
* used to create the SerialClob
*/
@Test
public void test24() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
String expected = "test string";
assertEquals(expected, sc.getSubString(5, 11));
}
Aggregations