// Test activities of process
assertTrue(proc.steps().size() == 9);
Iterator it = proc.steps().iterator();
List acts = new LinkedList();
while (it.hasNext()) {
WrappedActivity act = (WrappedActivity)it.next();
acts.clear();
if (act.name().equals("ACT1")) {
Util.sleep(15000);
assertTrue(act.priority() == 1);
assertTrue(act.description()
.equals("Activity with dummy implementation"));
assertTrue(act.assignments().size() == 0);
assertTrue(act.container().key().equals(proc.key()));
assertTrue(act.nextActivities().size() == 2);
acts.add("B1");
acts.add("B2");
assertTrue(activitiesIncluded(act.nextActivities(), acts));
} else if (act.name().equals("ACT2")) {
Util.sleep(15000);
assertTrue(act.priority() == 2);
assertTrue(act.description() == null);
assertTrue(act.assignments().size() == 0);
assertTrue(act.nextActivities().size() == 2);
acts.add("B1");
acts.add("B2");
assertTrue(activitiesIncluded(act.nextActivities(), acts));
} else if (act.name().equals("ACT3")) {
assertTrue(act.priority() == 3);
assertTrue(act.description() == null);
assertTrue(act.assignments().size() == 0);
assertTrue(act.nextActivities().size() == 0);
} else if (act.name().equals("ACT4")) {
assertTrue(act.priority() == 4);
assertTrue(act.description() == null);
assertTrue(act.assignments().size() == 0);
assertTrue(act.nextActivities().size() == 0);
} else if (act.name().equals("B0")) {
assertTrue(act.priority() == 3); // default priority
assertTrue(act.description() == null);
assertTrue(act.assignments().size() == 0);
assertTrue(act.nextActivities().size() == 2);
acts.add("B3");
acts.add("B4");
assertTrue(activitiesIncluded(act.nextActivities(), acts));
} else if (act.name().equals("B1")) {
assertTrue(act.priority() == 3); // default priority
assertTrue(act.description() == null);
assertTrue(act.assignments().size() == 0);
assertTrue(act.nextActivities().size() == 1);
acts.add("B0");
assertTrue(activitiesIncluded(act.nextActivities(), acts));
} else if (act.name().equals("B2")) {
assertTrue(act.priority() == 3); // default priority
assertTrue(act.description() == null);
assertTrue(act.assignments().size() == 0);
assertTrue(act.nextActivities().size() == 1);
acts.add("B0");
assertTrue(activitiesIncluded(act.nextActivities(), acts));
} else if (act.name().equals("B3")) {
assertTrue(act.priority() == 5);
assertTrue(act.description() == null);
assertTrue(act.assignments().size() == 0);
assertTrue(act.nextActivities().size() == 2);
acts.add("ACT3");
acts.add("ACT4");
assertTrue(activitiesIncluded(act.nextActivities(), acts));
} else if (act.name().equals("B4")) {
assertTrue(act.priority() == 3); // default priority
assertTrue(act.description() == null);
assertTrue(act.assignments().size() == 0);
assertTrue(act.nextActivities().size() == 2);
acts.add("ACT3");
acts.add("ACT4");
assertTrue(activitiesIncluded(act.nextActivities(), acts));
} else {
assertTrue("Invalid activity " + act.name(), false);
}
}
procDir.removeProcess(proc.getWfProcess());
Util.logExit("testActivitiesBlock1");
}