Search in sources :

Example 16 with StubBlob

use of util.StubBlob in project jdk8u_jdk by JetBrains.

the class SerialBlobTests method test02.

/*
     * Validate calling getBinaryStream() after calling free() throws an
     * SerialException
     */
@Test(expectedExceptions = SerialException.class)
public void test02() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.getBinaryStream(1, 5);
}
Also used : SerialBlob(javax.sql.rowset.serial.SerialBlob) StubBlob(util.StubBlob) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 17 with StubBlob

use of util.StubBlob in project jdk8u_jdk by JetBrains.

the class SerialBlobTests method test01.

/*
     * Validate calling getBinaryStream() after calling free() throws an
     * SerialException
     */
@Test(expectedExceptions = SerialException.class)
public void test01() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.getBinaryStream();
}
Also used : SerialBlob(javax.sql.rowset.serial.SerialBlob) StubBlob(util.StubBlob) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Aggregations

StubBlob (util.StubBlob)17 SerialBlob (javax.sql.rowset.serial.SerialBlob)16 Test (org.testng.annotations.Test)16 BaseTest (util.BaseTest)16 Blob (java.sql.Blob)3 InputStream (java.io.InputStream)1 OutputStream (java.io.OutputStream)1 Reader (java.io.Reader)1 StringBufferInputStream (java.io.StringBufferInputStream)1 StringReader (java.io.StringReader)1 Array (java.sql.Array)1 Clob (java.sql.Clob)1 Ref (java.sql.Ref)1 SQLInputImpl (javax.sql.rowset.serial.SQLInputImpl)1 SerialArray (javax.sql.rowset.serial.SerialArray)1 SerialClob (javax.sql.rowset.serial.SerialClob)1 SerialRef (javax.sql.rowset.serial.SerialRef)1 DataProvider (org.testng.annotations.DataProvider)1 StubArray (util.StubArray)1 StubBaseRowSet (util.StubBaseRowSet)1