Search in sources :

Example 16 with StubClob

use of util.StubClob in project jdk8u_jdk by JetBrains.

the class SerialClobTests method test34.

/*
     * Check that setAsciiStream() returns a non-null OutputStream for an SerialClob
     * created from a Clob
     */
@Test
public void test34() throws Exception {
    SerialClob sc = new SerialClob(new StubClob());
    OutputStream os = sc.setAsciiStream(1);
    assertTrue(os != null);
}
Also used : OutputStream(java.io.OutputStream) StubClob(util.StubClob) SerialClob(javax.sql.rowset.serial.SerialClob) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 17 with StubClob

use of util.StubClob in project jdk8u_jdk by JetBrains.

the class SerialClobTests method test27.

/*
     * Validate that position() returned is -1 when an the search string is not
     * part of the SerialClob
     */
@Test
public void test27() throws Exception {
    long expectedPos = -1;
    SerialClob sc = new SerialClob(new StubClob());
    String expected = "I am Batman";
    long pos = sc.position(expected, 2);
    assertEquals(expectedPos, pos);
}
Also used : StubClob(util.StubClob) SerialClob(javax.sql.rowset.serial.SerialClob) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 18 with StubClob

use of util.StubClob in project jdk8u_jdk by JetBrains.

the class SerialClobTests method test10.

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

Example 19 with StubClob

use of util.StubClob in project jdk8u_jdk by JetBrains.

the class SerialClobTests method test.

/*
     * Validate calling free() does not throw an Exception
     */
@Test
public void test() throws Exception {
    SerialClob sc = new SerialClob(new StubClob());
    sc.free();
}
Also used : StubClob(util.StubClob) SerialClob(javax.sql.rowset.serial.SerialClob) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Example 20 with StubClob

use of util.StubClob in project jdk8u_jdk by JetBrains.

the class SerialClobTests method test01.

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

Aggregations

StubClob (util.StubClob)25 SerialClob (javax.sql.rowset.serial.SerialClob)24 Test (org.testng.annotations.Test)24 BaseTest (util.BaseTest)24 Clob (java.sql.Clob)3 InputStream (java.io.InputStream)2 Reader (java.io.Reader)2 OutputStream (java.io.OutputStream)1 StringBufferInputStream (java.io.StringBufferInputStream)1 StringReader (java.io.StringReader)1 Writer (java.io.Writer)1 Array (java.sql.Array)1 Blob (java.sql.Blob)1 Ref (java.sql.Ref)1 SQLInputImpl (javax.sql.rowset.serial.SQLInputImpl)1 SerialArray (javax.sql.rowset.serial.SerialArray)1 SerialBlob (javax.sql.rowset.serial.SerialBlob)1 SerialRef (javax.sql.rowset.serial.SerialRef)1 DataProvider (org.testng.annotations.DataProvider)1 StubArray (util.StubArray)1