use of util.StubBlob in project jdk8u_jdk by JetBrains.
the class SerialBlobTests method test09.
/*
* Validate calling setBytes() after calling free() throws an
* SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test09() throws Exception {
SerialBlob sb = new SerialBlob(new StubBlob());
sb.free();
sb.setBytes(1, new byte[10], 0, 5);
}
use of util.StubBlob in project jdk8u_jdk by JetBrains.
the class SerialBlobTests method test26.
/*
* Validate setBinaryStream returns an OutputStream when passed a Blob
*/
@Test
public void test26() throws Exception {
SerialBlob sb = new SerialBlob(new StubBlob());
OutputStream os = sb.setBinaryStream(0);
assertTrue(os != null);
}
use of util.StubBlob in project jdk8u_jdk by JetBrains.
the class SerialBlobTests method test06.
/*
* Validate calling position() after calling free() throws an
* SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test06() throws Exception {
SerialBlob sb = new SerialBlob(new StubBlob());
sb.free();
sb.position(new StubBlob(), 1);
}
use of util.StubBlob in project jdk8u_jdk by JetBrains.
the class SQLInputImplTests method test07.
/*
* Validate a Blob can be read
*/
@Test(enabled = true)
public void test07() throws Exception {
Blob b = new StubBlob();
Object[] values = { b };
SQLInputImpl sqli = new SQLInputImpl(values, map);
Blob b2 = sqli.readBlob();
assertTrue(Arrays.equals(b.getBytes(1, (int) b.length()), b2.getBytes(1, (int) b2.length())));
}
use of util.StubBlob in project jdk8u_jdk by JetBrains.
the class SerialBlobTests method test05.
/*
* Validate calling position() after calling free() throws an
* SerialException
*/
@Test(expectedExceptions = SerialException.class)
public void test05() throws Exception {
SerialBlob sb = new SerialBlob(new StubBlob());
sb.free();
sb.position(new byte[5], 1);
}
Aggregations