use of com.arjuna.ats.internal.jts.context.ContextManager in project narayana by jbosstm.
the class ContextManagerUnitTest method testContextManager.
@Test
public void testContextManager() throws Exception {
ContextManager manager = new ContextManager();
assertEquals(manager.current(Thread.currentThread().getName()), null);
assertEquals(manager.current(), null);
OTSImpleManager.current().begin();
manager.associate();
OTSImpleManager.current().suspend();
OTSImpleManager.current().begin();
Control ct = OTSImpleManager.current().suspend();
manager.addRemoteHierarchy(ct);
manager.popAction();
OTSImpleManager.current().suspend();
OTSImpleManager.current().begin();
ActionControl cont = (ActionControl) OTSImpleManager.current().getControlWrapper().getImple().getControl();
manager.addActionControlHierarchy(cont);
manager.purgeActions();
OTSImpleManager.current().suspend();
OTSImpleManager.current().begin();
manager.addControlImpleHierarchy(OTSImpleManager.current().getControlWrapper().getImple());
manager.purgeActions();
OTSImpleManager.current().suspend();
}
Aggregations