use of util.StubClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test34.
/*
* Check that setAsciiStream() returns a non-null OutputStream for an SerialClob
* created from a Clob
*/
@Test
public void test34() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
OutputStream os = sc.setAsciiStream(1);
assertTrue(os != null);
}
use of util.StubClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test27.
/*
* Validate that position() returned is -1 when an the search string is not
* part of the SerialClob
*/
@Test
public void test27() throws Exception {
long expectedPos = -1;
SerialClob sc = new SerialClob(new StubClob());
String expected = "I am Batman";
long pos = sc.position(expected, 2);
assertEquals(expectedPos, pos);
}
use of util.StubClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test10.
/*
* Validate calling setAsciiStream() after calling free() throws an
* SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test10() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
sc.free();
sc.setAsciiStream(5);
}
use of util.StubClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test.
/*
* Validate calling free() does not throw an Exception
*/
@Test
public void test() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
sc.free();
}
use of util.StubClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test01.
/*
* Validate calling getCharacterStream() after calling free() throws an
* SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test01() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
sc.free();
sc.getCharacterStream();
}
Aggregations