use of com.orientechnologies.orient.core.db.ODatabaseSession in project wicket-orientdb by OrienteerBAP.
the class TestRegisterHooks method testRegisterHooksInTwoDatabases.
@Test
public void testRegisterHooksInTwoDatabases() {
ODatabaseSession db = wicket.getTester().getDatabaseSession();
IOrientDbSettings settings = wicket.getTester().getApplication().getOrientDbSettings();
settings.addORecordHooks(RegisterHook.class);
assertRegisteredHook(db, RegisterHook.class);
ODatabaseDocument db2 = settings.getContext().cachedPool(settings.getDbName(), settings.getAdminUserName(), settings.getAdminPassword()).acquire();
assertRegisteredHook(db2, RegisterHook.class);
}
Aggregations