use of javax.sql.RowSetMetaData in project jdk8u_jdk by JetBrains.
the class RowSetMetaDataTests method test99.
/*
* Validate isWrapperFor and unwrap work correctly
*/
@SuppressWarnings("unchecked")
@Test
public void test99() throws Exception {
RowSetMetaData rsmd1 = rsmd;
ResultSetMetaData rsmd2 = rsmd;
Class clzz = rsmd.getClass();
assertTrue(rsmd1.isWrapperFor(clzz));
assertTrue(rsmd2.isWrapperFor(clzz));
RowSetMetaDataImpl rsmdi = (RowSetMetaDataImpl) rsmd2.unwrap(clzz);
// False should be returned
assertFalse(rsmd1.isWrapperFor(this.getClass()));
assertFalse(rsmd2.isWrapperFor(this.getClass()));
}
Aggregations