Search in sources :

Example 1 with ServerCaseModule

use of org.apache.cayenne.unit.di.server.ServerCaseModule in project cayenne by apache.

the class JCacheCase method setupInjector.

@BeforeClass
public static void setupInjector() {
    final DefaultScope testScope = new DefaultScope();
    injector = DIBootstrap.createInjector(new ServerCaseModule(testScope), binder -> binder.bind(ServerRuntime.class).toProvider(CacheServerRuntimeProvider.class).in(testScope));
    injector.getInstance(SchemaBuilder.class).rebuildSchema();
}
Also used : Injector(org.apache.cayenne.di.Injector) DefaultScope(org.apache.cayenne.di.spi.DefaultScope) SchemaBuilder(org.apache.cayenne.unit.di.server.SchemaBuilder) DICase(org.apache.cayenne.unit.di.DICase) BeforeClass(org.junit.BeforeClass) DIBootstrap(org.apache.cayenne.di.DIBootstrap) ServerRuntime(org.apache.cayenne.configuration.server.ServerRuntime) ServerCaseModule(org.apache.cayenne.unit.di.server.ServerCaseModule) SchemaBuilder(org.apache.cayenne.unit.di.server.SchemaBuilder) ServerCaseModule(org.apache.cayenne.unit.di.server.ServerCaseModule) DefaultScope(org.apache.cayenne.di.spi.DefaultScope) BeforeClass(org.junit.BeforeClass)

Aggregations

ServerRuntime (org.apache.cayenne.configuration.server.ServerRuntime)1 DIBootstrap (org.apache.cayenne.di.DIBootstrap)1 Injector (org.apache.cayenne.di.Injector)1 DefaultScope (org.apache.cayenne.di.spi.DefaultScope)1 DICase (org.apache.cayenne.unit.di.DICase)1 SchemaBuilder (org.apache.cayenne.unit.di.server.SchemaBuilder)1 ServerCaseModule (org.apache.cayenne.unit.di.server.ServerCaseModule)1 BeforeClass (org.junit.BeforeClass)1