use of util.StubClob 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 util.StubClob 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 util.StubClob 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 util.StubClob 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));
}
use of util.StubClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test05.
/*
* Validate calling truncate() after calling free() throws an
* SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test05() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
sc.free();
sc.truncate(1);
}
Aggregations