Search in sources :

Example 1 with SerialArray

use of javax.sql.rowset.serial.SerialArray in project jdk8u_jdk by JetBrains.

the class SerialArrayTests method test06.

/*
     * Validate a SerialException is thrown when getResultSet() is called
     */
@Test(expectedExceptions = SerialException.class)
public void test06() throws Exception {
    SerialArray sa = new SerialArray(a);
    sa.getResultSet(1, 1, null);
}
Also used : SerialArray(javax.sql.rowset.serial.SerialArray) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 2 with SerialArray

use of javax.sql.rowset.serial.SerialArray in project jdk8u_jdk by JetBrains.

the class SerialArrayTests method test10.

/*
     * Validate a SerialException is thrown when  getArray() is invoked after
     * free() is called
     */
@Test(expectedExceptions = SerialException.class)
public void test10() throws Exception {
    SerialArray sa = new SerialArray(a);
    sa.free();
    sa.getArray(1, 1);
}
Also used : SerialArray(javax.sql.rowset.serial.SerialArray) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 3 with SerialArray

use of javax.sql.rowset.serial.SerialArray in project jdk8u_jdk by JetBrains.

the class SerialArrayTests method test15.

/*
     * Validate getArray() returns the same Object[] used to create the
     * SerialArray
     */
@Test
public void test15() throws Exception {
    SerialArray sa = new SerialArray(a);
    Object[] o = (Object[]) sa.getArray(1, 2);
    assertTrue(Arrays.equals(o, Arrays.copyOfRange(coffees, 1, 3)));
}
Also used : SerialArray(javax.sql.rowset.serial.SerialArray) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 4 with SerialArray

use of javax.sql.rowset.serial.SerialArray in project jdk8u_jdk by JetBrains.

the class SerialArrayTests method test09.

/*
     * Validate a SerialException is thrown when  getArray() is invoked after
     * free() is called
     */
@Test(expectedExceptions = SerialException.class)
public void test09() throws Exception {
    SerialArray sa = new SerialArray(a);
    sa.free();
    sa.getArray(1, 1, map);
}
Also used : SerialArray(javax.sql.rowset.serial.SerialArray) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 5 with SerialArray

use of javax.sql.rowset.serial.SerialArray in project jdk8u_jdk by JetBrains.

the class SerialArrayTests method test07.

/*
     * Validate a SerialException is thrown when  getArray() is invoked after
     * free() is called
     */
@Test(expectedExceptions = SerialException.class)
public void test07() throws Exception {
    SerialArray sa = new SerialArray(a);
    sa.free();
    sa.getArray();
}
Also used : SerialArray(javax.sql.rowset.serial.SerialArray) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Aggregations

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