Search in sources :

Example 1 with DefaultAdhocObjectFactory

use of org.apache.cayenne.di.spi.DefaultAdhocObjectFactory in project cayenne by apache.

the class ToolsModuleTest method testModuleContents.

@Test
public void testModuleContents() {
    Logger log = mock(Logger.class);
    Injector i = DIBootstrap.createInjector(new ToolsModule(log));
    assertSame(log, i.getInstance(Logger.class));
    assertTrue(i.getInstance(DataSourceFactory.class) instanceof DriverDataSourceFactory);
    assertTrue(i.getInstance(AdhocObjectFactory.class) instanceof DefaultAdhocObjectFactory);
    assertTrue(i.getInstance(DbAdapterFactory.class) instanceof DefaultDbAdapterFactory);
}
Also used : DefaultAdhocObjectFactory(org.apache.cayenne.di.spi.DefaultAdhocObjectFactory) Injector(org.apache.cayenne.di.Injector) DefaultDbAdapterFactory(org.apache.cayenne.configuration.server.DefaultDbAdapterFactory) Logger(org.slf4j.Logger) Test(org.junit.Test)

Aggregations

DefaultDbAdapterFactory (org.apache.cayenne.configuration.server.DefaultDbAdapterFactory)1 Injector (org.apache.cayenne.di.Injector)1 DefaultAdhocObjectFactory (org.apache.cayenne.di.spi.DefaultAdhocObjectFactory)1 Test (org.junit.Test)1 Logger (org.slf4j.Logger)1