use of org.apache.jena.jdbc.results.metadata.columns.DateColumn in project jena by apache.
the class TestMetaResultSet method meta_result_set_date_02.
/**
* Test retrieving meta column values
*
* @throws SQLException
*/
@Test
public void meta_result_set_date_02() throws SQLException {
MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new DateColumn("Test", ResultSetMetaData.columnNullable) }, new Object[][] { { null } });
Assert.assertTrue(results.next());
Date value = results.getDate(1);
Assert.assertEquals(null, value);
Assert.assertTrue(results.wasNull());
Assert.assertFalse(results.next());
results.close();
Assert.assertTrue(results.isClosed());
}
use of org.apache.jena.jdbc.results.metadata.columns.DateColumn in project jena by apache.
the class TestMetaResultSet method meta_result_set_date_01.
/**
* Test retrieving meta column values
*
* @throws SQLException
*/
@SuppressWarnings("deprecation")
@Test
public void meta_result_set_date_01() throws SQLException {
MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new DateColumn("Test", ResultSetMetaData.columnNullable) }, new Object[][] { { new Date(2013, 4, 24) } });
Assert.assertTrue(results.next());
Date value = results.getDate(1);
Assert.assertEquals(new Date(2013, 4, 24), value);
Assert.assertFalse(results.wasNull());
Assert.assertFalse(results.next());
results.close();
Assert.assertTrue(results.isClosed());
}
Aggregations