use of util.StubClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test20.
/*
* Validate that a getAsciiStream() returns an InputStream when a Clob is
* used to create the SerialClob
*/
@Test
public void test20() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
InputStream is = sc.getAsciiStream();
assertTrue(is != null);
}
use of util.StubClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test09.
/*
* Validate calling position() after calling free() throws an
* SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test09() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
sc.free();
sc.position(new StubClob(), 1);
}
use of util.StubClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test33.
/*
* Check that setCharacterStream() returns a non-null Writer for an
* SerialClob created from a Clob
*/
@Test
public void test33() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
Writer w = sc.setCharacterStream(1);
assertTrue(w != null);
}
use of util.StubClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test35.
/*
* Check that truncate() truncates the length of the SerialClob to the
* specified size
*/
@Test
public void test35() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
sc.truncate(0);
assertTrue(sc.length() == 0);
sc = new SerialClob(chars);
sc.truncate(5);
assertTrue(sc.length() == 5);
}
use of util.StubClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test07.
/*
* Validate calling length() after calling free() throws an SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test07() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
sc.free();
sc.length();
}
Aggregations