Java Code Examples for javax.sql.rowset.serial.SerialClob#position()

The following examples show how to use javax.sql.rowset.serial.SerialClob#position() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SerialClobTests.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test25() throws Exception {
    long expectedPos = 5;
    SerialClob sc = new SerialClob(new StubClob());
    String expected = "test string";
    long pos = sc.position(expected, 1);
    assertEquals(expectedPos, pos);
}
 
Example 2
Source File: SerialClobTests.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test26() throws Exception {
    long expectedPos = -1;
    SerialClob sc = new SerialClob(chars);
    String expected = "test string";
    long pos = sc.position(expected, 1);
    assertEquals(expectedPos, pos);
}
 
Example 3
Source File: SerialClobTests.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test25() throws Exception {
    long expectedPos = 5;
    SerialClob sc = new SerialClob(new StubClob());
    String expected = "test string";
    long pos = sc.position(expected, 1);
    assertEquals(expectedPos, pos);
}
 
Example 4
Source File: SerialClobTests.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test30() throws Exception {
    long expectedPos = 17;
    String expected = "012";
    SerialClob sc = new SerialClob(expected.toCharArray());
    SerialClob sc1 = new SerialClob(new StubClob());
    long pos = sc1.position(sc, 1);
    assertEquals(expectedPos, pos);
}
 
Example 5
Source File: SerialClobTests.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test25() throws Exception {
    long expectedPos = 5;
    SerialClob sc = new SerialClob(new StubClob());
    String expected = "test string";
    long pos = sc.position(expected, 1);
    assertEquals(expectedPos, pos);
}
 
Example 6
Source File: SerialClobTests.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test30() throws Exception {
    long expectedPos = 17;
    String expected = "012";
    SerialClob sc = new SerialClob(expected.toCharArray());
    SerialClob sc1 = new SerialClob(new StubClob());
    long pos = sc1.position(sc, 1);
    assertEquals(expectedPos, pos);
}
 
Example 7
Source File: SerialClobTests.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test29() throws Exception {
    long expectedPos = 21;
    String expected = "Batman";
    String buf = "I am Joker, not the Batman, hahaha";
    SerialClob sc = new SerialClob(expected.toCharArray());
    SerialClob sc1 = new SerialClob(buf.toCharArray());
    long pos = sc1.position(sc, 1);
    assertEquals(expectedPos, pos);
}
 
Example 8
Source File: SerialClobTests.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test28() throws Exception {
    long expectedPos = 2;
    SerialClob sc = new SerialClob(chars);
    String expected = "ello";
    long pos = sc.position(expected, 1);
    assertEquals(expectedPos, pos);
}
 
Example 9
Source File: SerialClobTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test28() throws Exception {
    long expectedPos = 2;
    SerialClob sc = new SerialClob(chars);
    String expected = "ello";
    long pos = sc.position(expected, 1);
    assertEquals(expectedPos, pos);
}
 
Example 10
Source File: SerialClobTests.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test26() throws Exception {
    long expectedPos = -1;
    SerialClob sc = new SerialClob(chars);
    String expected = "test string";
    long pos = sc.position(expected, 1);
    assertEquals(expectedPos, pos);
}
 
Example 11
Source File: SerialClobTests.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 12
Source File: SerialClobTests.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test29() throws Exception {
    long expectedPos = 21;
    String expected = "Batman";
    String buf = "I am Joker, not the Batman, hahaha";
    SerialClob sc = new SerialClob(expected.toCharArray());
    SerialClob sc1 = new SerialClob(buf.toCharArray());
    long pos = sc1.position(sc, 1);
    assertEquals(expectedPos, pos);
}
 
Example 13
Source File: SerialClobTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 14
Source File: SerialClobTests.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test28() throws Exception {
    long expectedPos = 2;
    SerialClob sc = new SerialClob(chars);
    String expected = "ello";
    long pos = sc.position(expected, 1);
    assertEquals(expectedPos, pos);
}
 
Example 15
Source File: SerialClobTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test25() throws Exception {
    long expectedPos = 5;
    SerialClob sc = new SerialClob(new StubClob());
    String expected = "test string";
    long pos = sc.position(expected, 1);
    assertEquals(expectedPos, pos);
}
 
Example 16
Source File: SerialClobTests.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test25() throws Exception {
    long expectedPos = 5;
    SerialClob sc = new SerialClob(new StubClob());
    String expected = "test string";
    long pos = sc.position(expected, 1);
    assertEquals(expectedPos, pos);
}
 
Example 17
Source File: SerialClobTests.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test09() throws Exception {
    SerialClob sc = new SerialClob(new StubClob());
    sc.free();
    sc.position(new StubClob(), 1);
}
 
Example 18
Source File: SerialClobTests.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test08() throws Exception {
    SerialClob sc = new SerialClob(new StubClob());
    sc.free();
    sc.position("hello", 1);
}
 
Example 19
Source File: SerialClobTests.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test09() throws Exception {
    SerialClob sc = new SerialClob(new StubClob());
    sc.free();
    sc.position(new StubClob(), 1);
}
 
Example 20
Source File: SerialClobTests.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test08() throws Exception {
    SerialClob sc = new SerialClob(new StubClob());
    sc.free();
    sc.position("hello", 1);
}