use of org.apache.cayenne.unit.SQLServerUnitDbAdapter in project cayenne by apache.
the class SQLServerSnifferIT method testCreateAdapter.
@Test
public void testCreateAdapter() throws Exception {
SQLServerSniffer sniffer = new SQLServerSniffer(objectFactory);
DbAdapter adapter = null;
try (Connection c = dataSourceFactory.getSharedDataSource().getConnection()) {
adapter = sniffer.createAdapter(c.getMetaData());
}
if (accessStackAdapter instanceof SQLServerUnitDbAdapter) {
assertNotNull(adapter);
} else {
assertNull(adapter);
}
}
Aggregations