use of javax.sql.rowset.serial.SerialClob in project jdk8u_jdk by JetBrains.
the class BaseRowSetTests method testAdvancedParameters.
/*
* DataProvider used to set advanced parameters for types that are supported
*/
@DataProvider(name = "testAdvancedParameters")
private Object[][] testAdvancedParameters() throws SQLException {
byte[] bytes = new byte[10];
Ref aRef = new SerialRef(new StubRef("INTEGER", query));
Array aArray = new SerialArray(new StubArray("INTEGER", new Object[1]));
Blob aBlob = new SerialBlob(new StubBlob());
Clob aClob = new SerialClob(new StubClob());
Reader rdr = new StringReader(query);
InputStream is = new StringBufferInputStream(query);
;
brs = new StubBaseRowSet();
brs.setBytes(1, bytes);
brs.setAsciiStream(2, is, query.length());
brs.setRef(3, aRef);
brs.setArray(4, aArray);
brs.setBlob(5, aBlob);
brs.setClob(6, aClob);
brs.setBinaryStream(7, is, query.length());
brs.setUnicodeStream(8, is, query.length());
brs.setCharacterStream(9, rdr, query.length());
return new Object[][] { { 1, bytes }, { 2, is }, { 3, aRef }, { 4, aArray }, { 5, aBlob }, { 6, aClob }, { 7, is }, { 8, is }, { 9, rdr } };
}
use of javax.sql.rowset.serial.SerialClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test04.
/*
* Validate calling getSubString() after calling free() throws an
* SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test04() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
sc.free();
sc.getSubString(1, 1);
}
use of javax.sql.rowset.serial.SerialClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test02.
/*
* Validate calling getCharacterStream() after calling free() throws an
* SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test02() throws Exception {
SerialClob sc = new SerialClob(chars);
sc.free();
sc.getCharacterStream();
}
use of javax.sql.rowset.serial.SerialClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test19.
/*
* Clone a SerialClob and check that it is equal to itself
*/
@Test
public void test19() throws Exception {
SerialClob sc = new SerialClob(chars);
SerialClob sc1 = (SerialClob) sc.clone();
assertTrue(sc.equals(sc1), "SerialClobs not equal");
}
use of javax.sql.rowset.serial.SerialClob in project jdk8u_jdk by JetBrains.
the class SerialClobTests method test08.
/*
* Validate calling position() after calling free() throws an
* SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test08() throws Exception {
SerialClob sc = new SerialClob(new StubClob());
sc.free();
sc.position("hello", 1);
}
Aggregations