use of org.apache.jena.jdbc.results.metadata.columns.DoubleColumn in project jena by apache.
the class TestMetaResultSet method meta_result_set_double_01.
/**
* Test retrieving meta column values
*
* @throws SQLException
*/
@Test
public void meta_result_set_double_01() throws SQLException {
MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new DoubleColumn("Test", ResultSetMetaData.columnNullable) }, new Object[][] { { 0.123d } });
Assert.assertTrue(results.next());
double value = results.getDouble(1);
Assert.assertEquals(0.123d, value, 0d);
Assert.assertFalse(results.wasNull());
Assert.assertFalse(results.next());
results.close();
Assert.assertTrue(results.isClosed());
}
Aggregations