use of javax.sql.rowset.serial.SerialArray in project jdk8u_jdk by JetBrains.
the class SerialArrayTests method test14.
/*
* Validate getArray() returns the same Object[] used to create the
* SerialArray
*/
@Test
public void test14() throws Exception {
SerialArray sa = new SerialArray(a);
Object[] o = (Object[]) sa.getArray(map);
assertTrue(Arrays.equals(o, coffees));
}
use of javax.sql.rowset.serial.SerialArray in project jdk8u_jdk by JetBrains.
the class SerialArrayTests method test18.
/*
* Validate that a SerialArray that is serialized & deserialized is equal to
* itself
*/
@Test
public void test18() throws Exception {
SerialArray sa = new SerialArray(a);
SerialArray sa1 = serializeDeserializeObject(sa);
;
assertTrue(sa.equals(sa1));
}
use of javax.sql.rowset.serial.SerialArray in project jdk8u_jdk by JetBrains.
the class SerialArrayTests method test05.
/*
* Validate a SerialException is thrown when getResultSet() is called
*/
@Test(expectedExceptions = SerialException.class)
public void test05() throws Exception {
SerialArray sa = new SerialArray(a);
sa.getResultSet(1, 1);
}
use of javax.sql.rowset.serial.SerialArray in project jdk8u_jdk by JetBrains.
the class SQLOutputImplTests method test04.
/*
* Validate a Array can be written and returned
*/
@Test(enabled = true)
public void test04() throws Exception {
Object[] coffees = new Object[] { "Espresso", "Colombian", "French Roast", "Cappuccino" };
Array a = new StubArray("VARCHAR", coffees);
outImpl.writeArray(a);
SerialArray sa = (SerialArray) results.get(0);
assertTrue(Arrays.equals(coffees, (Object[]) sa.getArray()));
assertTrue(a.getBaseTypeName().equals(sa.getBaseTypeName()));
}
use of javax.sql.rowset.serial.SerialArray in project jdk8u_jdk by JetBrains.
the class SerialArrayTests method test04.
/*
* Validate a SerialException is thrown when getResultSet() is called
*/
@Test(expectedExceptions = SerialException.class)
public void test04() throws Exception {
SerialArray sa = new SerialArray(a);
sa.getResultSet(null);
}
Aggregations