use of org.apache.jena.jdbc.results.metadata.columns.LongIntegerColumn in project jena by apache.
the class TestMetaResultSet method meta_result_set_long_integer_02.
/**
* Test retrieving meta column values
*
* @throws SQLException
*/
@Test
public void meta_result_set_long_integer_02() throws SQLException {
MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new LongIntegerColumn("Test", ResultSetMetaData.columnNullable, true) }, new Object[][] { { null } });
Assert.assertTrue(results.next());
long value = results.getLong(1);
Assert.assertEquals(0, value);
Assert.assertTrue(results.wasNull());
Assert.assertFalse(results.next());
results.close();
Assert.assertTrue(results.isClosed());
}
use of org.apache.jena.jdbc.results.metadata.columns.LongIntegerColumn in project jena by apache.
the class TestMetaResultSet method meta_result_set_long_integer_01.
/**
* Test retrieving meta column values
*
* @throws SQLException
*/
@Test
public void meta_result_set_long_integer_01() throws SQLException {
MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new LongIntegerColumn("Test", ResultSetMetaData.columnNullable, true) }, new Object[][] { { 1234l } });
Assert.assertTrue(results.next());
long value = results.getLong(1);
Assert.assertEquals(1234, value);
Assert.assertFalse(results.wasNull());
Assert.assertFalse(results.next());
results.close();
Assert.assertTrue(results.isClosed());
}
Aggregations