use of javax.sql.rowset.serial.SerialStruct in project jdk8u_jdk by JetBrains.
the class SerialStructTests method test01.
/*
* Validate that getSQLTypeName() returns the same SQLType specified by
* the Struct used to create the object
*/
@Test
public void test01() throws Exception {
SerialStruct ss = new SerialStruct(struct, map);
assertEquals(ss.getSQLTypeName(), sqlType);
}
use of javax.sql.rowset.serial.SerialStruct in project jdk8u_jdk by JetBrains.
the class SerialStructTests method test08.
/**
* Validate that a SerialStruct that is serialized & deserialized is equal
* to itself
*/
@Test
public void test08() throws Exception {
SerialStruct ss = new SerialStruct(struct, map);
SerialStruct ss1 = serializeDeserializeObject(ss);
;
assertTrue(ss.equals(ss1));
}
use of javax.sql.rowset.serial.SerialStruct in project jdk8u_jdk by JetBrains.
the class SerialStructTests method test03.
/*
* Validate that getAttributes() returns the same attributes specified by
* the Struct used to create the object
*/
@Test
public void test03() throws Exception {
SerialStruct ss = new SerialStruct(struct, map);
assertTrue(Arrays.equals(attributes, ss.getAttributes()));
}
use of javax.sql.rowset.serial.SerialStruct in project jdk8u_jdk by JetBrains.
the class SerialStructTests method test04.
/*
* Validate that getAttributes() returns the same attributes specified by
* the Struct used to create the object
*/
@Test
public void test04() throws Exception {
SerialStruct ss = new SerialStruct(hero, map);
assertTrue(Arrays.equals(attributes, ss.getAttributes()));
}
use of javax.sql.rowset.serial.SerialStruct in project jdk8u_jdk by JetBrains.
the class SQLOutputImplTests method test10.
/*
* Validate an Object implementing SQLData can be written and returned
*/
@Test(enabled = true)
public void test10() throws Exception {
Object[] attributes = new Object[] { "Bruce", "Wayne", 1939, "Batman" };
outImpl.writeObject(hero);
SerialStruct ss = (SerialStruct) results.get(0);
assertTrue(Arrays.equals(attributes, (Object[]) ss.getAttributes()));
assertTrue(sqlType.equals(ss.getSQLTypeName()));
}
Aggregations