javax.sql.rowset.serial.SQLInputImpl Java Examples
The following examples show how to use
javax.sql.rowset.serial.SQLInputImpl.
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: SQLInputImplTests.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test() public void test03() throws Exception { impl.readSQL(new SQLInputImpl(typeValues, map), "misc"); assertTrue(Arrays.equals(impl.toArray(), typeValues)); // Null out a field and make sure the arrays do not match typeValues[2] = null; assertFalse(Arrays.equals(impl.toArray(), typeValues)); }
Example #2
Source File: SQLInputImplTests.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Test() public void test04() throws Exception { Object[] values = {"Hello", null, 1}; SQLInputImpl sqli = new SQLInputImpl(values, map); String s = sqli.readString(); assertFalse(sqli.wasNull()); s = sqli.readString(); assertTrue(sqli.wasNull()); int i = sqli.readInt(); assertFalse(sqli.wasNull()); }
Example #3
Source File: SQLInputImplTests.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test() public void test04() throws Exception { Object[] values = {"Hello", null, 1}; SQLInputImpl sqli = new SQLInputImpl(values, map); String s = sqli.readString(); assertFalse(sqli.wasNull()); s = sqli.readString(); assertTrue(sqli.wasNull()); int i = sqli.readInt(); assertFalse(sqli.wasNull()); }
Example #4
Source File: SQLInputImplTests.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test10() throws Exception { URL u = new URL("http://www.oracle.com/");; Object[] values = {u}; SQLInputImpl sqli = new SQLInputImpl(values, map); URL u2 = sqli.readURL(); assertTrue(u2.equals(u)); assertTrue(u2.sameFile(u)); }
Example #5
Source File: SQLInputImplTests.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test08() throws Exception { Clob c = new StubClob(); Object[] values = {c}; SQLInputImpl sqli = new SQLInputImpl(values, map); Clob c2 = sqli.readClob(); assertTrue(c.getSubString(1, (int) c.length()).equals(c2.getSubString(1, (int) c2.length()))); }
Example #6
Source File: SQLOutputImplTests.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test() public void test03() throws Exception { impl.readSQL(new SQLInputImpl(typeValues, map), "misc"); impl.writeSQL(outImpl); assertTrue(Arrays.equals(results.toArray(), typeValues)); // Null out a field and make sure the arrays do not match typeValues[2] = null; assertFalse(Arrays.equals(results.toArray(), typeValues)); }
Example #7
Source File: SQLInputImplTests.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test() public void test03() throws Exception { impl.readSQL(new SQLInputImpl(typeValues, map), "misc"); assertTrue(Arrays.equals(impl.toArray(), typeValues)); // Null out a field and make sure the arrays do not match typeValues[2] = null; assertFalse(Arrays.equals(impl.toArray(), typeValues)); }
Example #8
Source File: SQLInputImplTests.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test() public void test04() throws Exception { Object[] values = {"Hello", null, 1}; SQLInputImpl sqli = new SQLInputImpl(values, map); String s = sqli.readString(); assertFalse(sqli.wasNull()); s = sqli.readString(); assertTrue(sqli.wasNull()); int i = sqli.readInt(); assertFalse(sqli.wasNull()); }
Example #9
Source File: SQLInputImplTests.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test() public void test05() throws Exception { Object[] values = {hero}; SQLInputImpl sqli = new SQLInputImpl(values, map); Object o = sqli.readObject(); assertTrue(hero.equals(o)); }
Example #10
Source File: SQLInputImplTests.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test06() throws Exception { Object[] coffees = new Object[]{"Espresso", "Colombian", "French Roast", "Cappuccino"}; Array a = new StubArray("VARCHAR", coffees); Object[] values = {a}; SQLInputImpl sqli = new SQLInputImpl(values, map); Array a2 = sqli.readArray(); assertTrue(Arrays.equals((Object[]) a2.getArray(), (Object[]) a.getArray())); assertTrue(a.getBaseTypeName().equals(a2.getBaseTypeName())); }
Example #11
Source File: SQLInputImplTests.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test07() throws Exception { Blob b = new StubBlob(); Object[] values = {b}; SQLInputImpl sqli = new SQLInputImpl(values, map); Blob b2 = sqli.readBlob(); assertTrue(Arrays.equals( b.getBytes(1, (int) b.length()), b2.getBytes(1, (int) b2.length()))); }
Example #12
Source File: SQLInputImplTests.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test09() throws Exception { Ref ref = new StubRef(sqlType, hero); Object[] values = {ref}; SQLInputImpl sqli = new SQLInputImpl(values, map); Ref ref2 = sqli.readRef(); assertTrue(ref.getObject().equals(ref2.getObject())); assertTrue(ref.getBaseTypeName().equals(ref2.getBaseTypeName())); }
Example #13
Source File: SQLInputImplTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test09() throws Exception { Ref ref = new StubRef(sqlType, hero); Object[] values = {ref}; SQLInputImpl sqli = new SQLInputImpl(values, map); Ref ref2 = sqli.readRef(); assertTrue(ref.getObject().equals(ref2.getObject())); assertTrue(ref.getBaseTypeName().equals(ref2.getBaseTypeName())); }
Example #14
Source File: SQLInputImplTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test08() throws Exception { Clob c = new StubClob(); Object[] values = {c}; SQLInputImpl sqli = new SQLInputImpl(values, map); Clob c2 = sqli.readClob(); assertTrue(c.getSubString(1, (int) c.length()).equals(c2.getSubString(1, (int) c2.length()))); }
Example #15
Source File: SQLInputImplTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test07() throws Exception { Blob b = new StubBlob(); Object[] values = {b}; SQLInputImpl sqli = new SQLInputImpl(values, map); Blob b2 = sqli.readBlob(); assertTrue(Arrays.equals( b.getBytes(1, (int) b.length()), b2.getBytes(1, (int) b2.length()))); }
Example #16
Source File: SQLInputImplTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test10() throws Exception { URL u = new URL("http://www.oracle.com/");; Object[] values = {u}; SQLInputImpl sqli = new SQLInputImpl(values, map); URL u2 = sqli.readURL(); assertTrue(u2.equals(u)); assertTrue(u2.sameFile(u)); }
Example #17
Source File: SQLOutputImplTests.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test() public void test03() throws Exception { impl.readSQL(new SQLInputImpl(typeValues, map), "misc"); impl.writeSQL(outImpl); assertTrue(Arrays.equals(results.toArray(), typeValues)); // Null out a field and make sure the arrays do not match typeValues[2] = null; assertFalse(Arrays.equals(results.toArray(), typeValues)); }
Example #18
Source File: SQLInputImplTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test() public void test04() throws Exception { Object[] values = {"Hello", null, 1}; SQLInputImpl sqli = new SQLInputImpl(values, map); String s = sqli.readString(); assertFalse(sqli.wasNull()); s = sqli.readString(); assertTrue(sqli.wasNull()); int i = sqli.readInt(); assertFalse(sqli.wasNull()); }
Example #19
Source File: SQLInputImplTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test() public void test03() throws Exception { impl.readSQL(new SQLInputImpl(typeValues, map), "misc"); assertTrue(Arrays.equals(impl.toArray(), typeValues)); // Null out a field and make sure the arrays do not match typeValues[2] = null; assertFalse(Arrays.equals(impl.toArray(), typeValues)); }
Example #20
Source File: SQLInputImplTests.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test06() throws Exception { Object[] coffees = new Object[]{"Espresso", "Colombian", "French Roast", "Cappuccino"}; Array a = new StubArray("VARCHAR", coffees); Object[] values = {a}; SQLInputImpl sqli = new SQLInputImpl(values, map); Array a2 = sqli.readArray(); assertTrue(Arrays.equals((Object[]) a2.getArray(), (Object[]) a.getArray())); assertTrue(a.getBaseTypeName().equals(a2.getBaseTypeName())); }
Example #21
Source File: SQLOutputImplTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test() public void test03() throws Exception { impl.readSQL(new SQLInputImpl(typeValues, map), "misc"); impl.writeSQL(outImpl); assertTrue(Arrays.equals(results.toArray(), typeValues)); // Null out a field and make sure the arrays do not match typeValues[2] = null; assertFalse(Arrays.equals(results.toArray(), typeValues)); }
Example #22
Source File: SQLInputImplTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test() public void test11() throws Exception { Object[] attributes = new Object[]{"Bruce", "Wayne", 1939, "Batman"}; map.put(sqlType, Class.forName("util.SuperHero")); Struct struct = new StubStruct(sqlType, attributes); Object[] values = {struct}; SQLInputImpl sqli = new SQLInputImpl(values, map); Object o = sqli.readObject(); assertTrue(hero.equals(o)); }
Example #23
Source File: SQLInputImplTests.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test09() throws Exception { Ref ref = new StubRef(sqlType, hero); Object[] values = {ref}; SQLInputImpl sqli = new SQLInputImpl(values, map); Ref ref2 = sqli.readRef(); assertTrue(ref.getObject().equals(ref2.getObject())); assertTrue(ref.getBaseTypeName().equals(ref2.getBaseTypeName())); }
Example #24
Source File: SQLInputImplTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test09() throws Exception { Ref ref = new StubRef(sqlType, hero); Object[] values = {ref}; SQLInputImpl sqli = new SQLInputImpl(values, map); Ref ref2 = sqli.readRef(); assertTrue(ref.getObject().equals(ref2.getObject())); assertTrue(ref.getBaseTypeName().equals(ref2.getBaseTypeName())); }
Example #25
Source File: SQLInputImplTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test08() throws Exception { Clob c = new StubClob(); Object[] values = {c}; SQLInputImpl sqli = new SQLInputImpl(values, map); Clob c2 = sqli.readClob(); assertTrue(c.getSubString(1, (int) c.length()).equals(c2.getSubString(1, (int) c2.length()))); }
Example #26
Source File: SQLInputImplTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test07() throws Exception { Blob b = new StubBlob(); Object[] values = {b}; SQLInputImpl sqli = new SQLInputImpl(values, map); Blob b2 = sqli.readBlob(); assertTrue(Arrays.equals( b.getBytes(1, (int) b.length()), b2.getBytes(1, (int) b2.length()))); }
Example #27
Source File: SQLInputImplTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test06() throws Exception { Object[] coffees = new Object[]{"Espresso", "Colombian", "French Roast", "Cappuccino"}; Array a = new StubArray("VARCHAR", coffees); Object[] values = {a}; SQLInputImpl sqli = new SQLInputImpl(values, map); Array a2 = sqli.readArray(); assertTrue(Arrays.equals((Object[]) a2.getArray(), (Object[]) a.getArray())); assertTrue(a.getBaseTypeName().equals(a2.getBaseTypeName())); }
Example #28
Source File: SQLInputImplTests.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test07() throws Exception { Blob b = new StubBlob(); Object[] values = {b}; SQLInputImpl sqli = new SQLInputImpl(values, map); Blob b2 = sqli.readBlob(); assertTrue(Arrays.equals( b.getBytes(1, (int) b.length()), b2.getBytes(1, (int) b2.length()))); }
Example #29
Source File: SQLOutputImplTests.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Test() public void test03() throws Exception { impl.readSQL(new SQLInputImpl(typeValues, map), "misc"); impl.writeSQL(outImpl); assertTrue(Arrays.equals(results.toArray(), typeValues)); // Null out a field and make sure the arrays do not match typeValues[2] = null; assertFalse(Arrays.equals(results.toArray(), typeValues)); }
Example #30
Source File: SQLInputImplTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test() public void test03() throws Exception { impl.readSQL(new SQLInputImpl(typeValues, map), "misc"); assertTrue(Arrays.equals(impl.toArray(), typeValues)); // Null out a field and make sure the arrays do not match typeValues[2] = null; assertFalse(Arrays.equals(impl.toArray(), typeValues)); }