assertEquals("Wrong number of available workflows:", 2, action.getAvailableWorkflowVOList().size());
}
public void testExecute2ActiveWorkflows() throws Exception
{
WorkflowVO workflow1 = controller.initializeWorkflow(getAdminPrincipal(), "Create News", 0, WorkflowController.createWorkflowParameters(request));
WorkflowVO workflow2 = controller.initializeWorkflow(getAdminPrincipal(), "Create User", 0, WorkflowController.createWorkflowParameters(request));
try
{
assertSuccess(action.doExecute());
assertEquals("Wrong number of available workflows:", 2, action.getAvailableWorkflowVOList().size());
assertTrue("There should be at least 2 current workflows", action.getWorkflowVOList().size() >= 2);
List availableActions = action.getWorkflowActionVOList();
assertTrue("There should be at least 2 current actions", availableActions.size() >= 2);
assertContains(availableActions, createCreateNews(workflow1.getWorkflowId()));
assertContains(availableActions, createRegisterUser(workflow2.getWorkflowId()));
}
finally
{
finishWorkflow(workflow1.getIdAsPrimitive());
finishWorkflow(workflow2.getIdAsPrimitive());
}
}