use of com.arjuna.mw.wsas.activity.HLS in project narayana by jbosstm.
the class ContextTest method testContext.
@Test
public void testContext() throws Exception {
UserActivity ua = UserActivityFactory.userActivity();
HLS[] currentHLS = ActivityManagerFactory.activityManager().allHighLevelServices();
for (HLS hls : currentHLS) {
ActivityManagerFactory.activityManager().removeHLS(hls);
}
try {
ua.start("dummy");
System.out.println("Started: " + ua.activityName());
ua.start("dummy");
System.out.println("Started: " + ua.activityName());
ContextManager manager = new ContextManager();
com.arjuna.mw.wsas.context.Context context = manager.context("dummy");
if (context != null) {
fail("Context not null: " + context);
}
} finally {
try {
for (HLS hls : currentHLS) {
ActivityManagerFactory.activityManager().addHLS(hls);
}
} catch (Exception e) {
}
WSASTestUtils.cleanup(ua);
}
}
Aggregations