01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.workflow;
06:
07: import com.opensymphony.workflow.basic.BasicWorkflow;
08:
09: import junit.framework.TestCase;
10:
11: /**
12: * @author hani Date: Feb 17, 2005 Time: 4:24:20 PM
13: */
14: public class JoinTestCase extends TestCase {
15: //~ Instance fields ////////////////////////////////////////////////////////
16:
17: private Workflow workflow;
18:
19: //~ Methods ////////////////////////////////////////////////////////////////
20:
21: public void testWithReject() throws Exception {
22: checkRoute(new int[] { 2, 3, 2, 4, 6, 7 });
23: }
24:
25: protected void setUp() throws Exception {
26: workflow = new BasicWorkflow("testuser");
27: }
28:
29: private void checkRoute(int[] actions) throws Exception {
30: long workflowId = workflow.initialize(getClass().getResource(
31: "/samples/join.xml").toString(), 1, null);
32:
33: for (int i = 0; i < actions.length; i++) {
34: workflow.doAction(workflowId, actions[i], null);
35: }
36: }
37: }
|