Search in sources :

Example 1 with ModuleContext

use of core.framework.impl.module.ModuleContext in project core-ng-project by neowu.

the class AbstractTestModule method configure.

public final void configure(TestBeanFactory beanFactory) {
    logger.info("initialize test context");
    context = new ModuleContext(beanFactory, new MockFactoryImpl());
    logger.info("initialize application");
    initialize();
    context.config.validate();
    ((TestBeanFactory) context.beanFactory).validateOverrideBindings();
}
Also used : TestBeanFactory(core.framework.test.inject.TestBeanFactory) ModuleContext(core.framework.impl.module.ModuleContext)

Example 2 with ModuleContext

use of core.framework.impl.module.ModuleContext in project core-ng-project by neowu.

the class RouteConfigTest method createRouteConfig.

@BeforeEach
void createRouteConfig() {
    ModuleContext context = new ModuleContext(new BeanFactory(), new TestMockFactory());
    config = new RouteConfig(context);
}
Also used : ModuleContext(core.framework.impl.module.ModuleContext) BeanFactory(core.framework.impl.inject.BeanFactory) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 3 with ModuleContext

use of core.framework.impl.module.ModuleContext in project core-ng-project by neowu.

the class SystemModuleTest method createSystemModule.

@BeforeEach
void createSystemModule() {
    systemModule = new SystemModule(null);
    systemModule.context = new ModuleContext(new BeanFactory(), new TestMockFactory());
    System.clearProperty("sys.http.port");
}
Also used : ModuleContext(core.framework.impl.module.ModuleContext) BeanFactory(core.framework.impl.inject.BeanFactory) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 4 with ModuleContext

use of core.framework.impl.module.ModuleContext in project core-ng-project by neowu.

the class App method configure.

public final void configure() {
    logger.info("initialize framework");
    logger.info("availableProcessors={}, maxMemory={}", Threads.availableProcessors(), Runtime.getRuntime().maxMemory());
    context = new ModuleContext(new BeanFactory(), null);
    logger.info("initialize application");
    initialize();
    context.config.validate();
}
Also used : ModuleContext(core.framework.impl.module.ModuleContext) BeanFactory(core.framework.impl.inject.BeanFactory)

Aggregations

ModuleContext (core.framework.impl.module.ModuleContext)4 BeanFactory (core.framework.impl.inject.BeanFactory)3 BeforeEach (org.junit.jupiter.api.BeforeEach)2 TestBeanFactory (core.framework.test.inject.TestBeanFactory)1