use of com.adaptris.core.StateManagedComponent in project interlok by adaptris.
the class LifecycleHelperTest method testLifecycle.
@Test
public void testLifecycle() throws Exception {
StateManagedComponent stateManaged = new NullService();
ComponentLifecycle noState = new ChannelList();
try {
initAndStart(stateManaged);
initAndStart(noState);
initAndStart(null);
stopAndClose(null);
} finally {
stopAndClose(stateManaged);
stopAndClose(noState);
}
}
use of com.adaptris.core.StateManagedComponent in project interlok by adaptris.
the class LoggingHelperTest method testFriendlyNameStateManagedComponent.
@Test
public void testFriendlyNameStateManagedComponent() throws Exception {
assertEquals("", friendlyName((StateManagedComponent) null));
NullService service = new NullService();
assertEquals("NullService", friendlyName((StateManagedComponent) service));
service.setUniqueId("testFriendlyNameService");
assertEquals("NullService(testFriendlyNameService)", friendlyName((StateManagedComponent) service));
}
Aggregations