use of javax.sql.rowset.serial.SerialClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test23.
/*
* Validate that a getSubString() returns the correct value when a char[] is
* used to create the SerialClob
*/
@Test
public void test23() throws Exception {
SerialClob sc = new SerialClob(chars);
String expected = "world";
assertEquals(expected, sc.getSubString(7, 5));
}
use of javax.sql.rowset.serial.SerialClob 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 javax.sql.rowset.serial.SerialClob 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();
}
use of javax.sql.rowset.serial.SerialClob 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 javax.sql.rowset.serial.SerialClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test28.
/*
* Validate that position() returns the correct value when a char[] is used
* to create the SerialClob
*/
@Test
public void test28() throws Exception {
long expectedPos = 2;
SerialClob sc = new SerialClob(chars);
String expected = "ello";
long pos = sc.position(expected, 1);
assertEquals(expectedPos, pos);
}
Aggregations