use of io.vertigo.core.spaces.component.data.StartedManager in project vertigo by KleeGroup.
the class ComponentSpace4Test method testStartedComponent.
@Test
public void testStartedComponent() {
final AppConfig appConfig = AppConfig.builder().beginBoot().withLogConfig(new LogConfig("/log4j.xml")).endBoot().addModule(ModuleConfig.builder("Started").addComponent(StartedManager.class, StartedManagerImpl.class).build()).addInitializer(StartedManagerInitializer.class).build();
final StartedManager startedManager;
try (AutoCloseableApp app = new AutoCloseableApp(appConfig)) {
startedManager = app.getComponentSpace().resolve(StartedManager.class);
assertTrue(startedManager.isInitialized(), "Component StartedManager not Initialized");
assertTrue(startedManager.isStarted(), "Component StartedManager not Started");
assertTrue(startedManager.isAppPreActivated(), "Component StartedManager not PostStarted");
}
assertFalse(startedManager.isStarted(), "Component StartedManager not Stopped");
}
Aggregations