use of org.apache.jena.jdbc.preprocessing.CommandPreProcessor in project jena by apache.
the class AbstractJenaDriverTests method driver_connect_06.
/**
* Tests using a driver to create a connection with its own URLs plus the
* standard pre-processor parameter
*
* @throws SQLException
*/
@Test
public void driver_connect_06() throws SQLException {
String url = this.getConnectionUrl();
Assume.assumeNotNull(url);
url = url + "&" + JenaDriver.PARAM_PRE_PROCESSOR + "=" + Echo.class.getCanonicalName();
JenaDriver driver = this.getDriver();
JenaConnection conn = (JenaConnection) driver.connect(url, null);
Assert.assertFalse(conn.isClosed());
Iterator<CommandPreProcessor> iter = conn.getPreProcessors();
Assert.assertTrue(iter.hasNext());
iter.next();
Assert.assertFalse(iter.hasNext());
conn.close();
Assert.assertTrue(conn.isClosed());
}
Aggregations