use of io.joynr.jeeintegration.context.JoynrJeeMessageContext in project joynr by bmwcarit.
the class JoynrJeeMessageContextTest method testContextRegistered.
@Test
public void testContextRegistered() {
JoynrJeeMessageContext.getInstance().activate();
Context result = beanManager.getContext(JoynrJeeMessageScoped.class);
assertNotNull(result);
assertTrue(result instanceof JoynrJeeMessageContext);
JoynrJeeMessageContext.getInstance().deactivate();
try {
result = beanManager.getContext(JoynrJeeMessageScoped.class);
fail("Shouldn't get it after deactivation.");
} catch (ContextNotActiveException e) {
logger.trace("Context not available after deactivation as expected.");
}
}
Aggregations