Search in sources :

Example 1 with DbFacade

use of org.ovirt.engine.core.dal.dbbroker.DbFacade in project ovirt-engine by oVirt.

the class DbDependentTestBase method initDbFacade.

@BeforeClass
public static void initDbFacade() throws Exception {
    dbFacade = mock(DbFacade.class);
    // As long as classes are calling DbFacade.getInstance,
    // we'll need this code
    Field instanceField = DbFacade.class.getDeclaredField("instance");
    instanceField.setAccessible(true);
    instanceField.set(null, dbFacade);
}
Also used : Field(java.lang.reflect.Field) DbFacade(org.ovirt.engine.core.dal.dbbroker.DbFacade) BeforeClass(org.junit.BeforeClass)

Aggregations

Field (java.lang.reflect.Field)1 BeforeClass (org.junit.BeforeClass)1 DbFacade (org.ovirt.engine.core.dal.dbbroker.DbFacade)1