Search in sources :

Example 11 with SerialClob

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

the class SerialClobTests method test06.

/*
     * Validate calling getAsciiStream() after calling free() throws an
     * SerialException
     */
@Test(expectedExceptions = SerialException.class)
public void test06() throws Exception {
    SerialClob sc = new SerialClob(new StubClob());
    sc.free();
    sc.getAsciiStream();
}
Also used : StubClob(util.StubClob) SerialClob(javax.sql.rowset.serial.SerialClob) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 12 with SerialClob

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

the class SerialClobTests method test03.

/*
     * Validate calling getCharacterStream() after calling free() throws an
     * SerialException
     */
@Test(expectedExceptions = SerialException.class)
public void test03() throws Exception {
    SerialClob sc = new SerialClob(new StubClob());
    sc.free();
    sc.getCharacterStream(1, 5);
}
Also used : StubClob(util.StubClob) SerialClob(javax.sql.rowset.serial.SerialClob) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 13 with SerialClob

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

the class SerialClobTests method test12.

/*
     * Validate calling setString() after calling free() throws an
     * SerialException
     */
@Test(expectedExceptions = SerialException.class)
public void test12() throws Exception {
    SerialClob sc = new SerialClob(new StubClob());
    sc.free();
    sc.setString(1, "hello");
}
Also used : StubClob(util.StubClob) SerialClob(javax.sql.rowset.serial.SerialClob) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 14 with SerialClob

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

the class SerialClobTests method test21.

/*
     * Validate that a getCharacterStream() returns an Reader when a Clob is
     * used to create the SerialClob
     */
@Test
public void test21() throws Exception {
    SerialClob sc = new SerialClob(new StubClob());
    Reader is = sc.getCharacterStream();
    assertTrue(is != null);
}
Also used : Reader(java.io.Reader) StubClob(util.StubClob) SerialClob(javax.sql.rowset.serial.SerialClob) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 15 with SerialClob

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

the class SerialClobTests method test24.

/*
     * Validate that a getSubString() returns the correct value when a Clob is
     * used to create the SerialClob
     */
@Test
public void test24() throws Exception {
    SerialClob sc = new SerialClob(new StubClob());
    String expected = "test string";
    assertEquals(expected, sc.getSubString(5, 11));
}
Also used : StubClob(util.StubClob) SerialClob(javax.sql.rowset.serial.SerialClob) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Aggregations

SerialClob (javax.sql.rowset.serial.SerialClob)43 Test (org.testng.annotations.Test)40 BaseTest (util.BaseTest)40 StubClob (util.StubClob)24 Reader (java.io.Reader)5 InputStream (java.io.InputStream)2 Clob (java.sql.Clob)2 SerialArray (javax.sql.rowset.serial.SerialArray)2 SerialBlob (javax.sql.rowset.serial.SerialBlob)2 OutputStream (java.io.OutputStream)1 StringBufferInputStream (java.io.StringBufferInputStream)1 StringReader (java.io.StringReader)1 Writer (java.io.Writer)1 BigDecimal (java.math.BigDecimal)1 Array (java.sql.Array)1 Blob (java.sql.Blob)1 Ref (java.sql.Ref)1 SQLException (java.sql.SQLException)1 SQLInputImpl (javax.sql.rowset.serial.SQLInputImpl)1 SerialRef (javax.sql.rowset.serial.SerialRef)1