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: May 5, 2004 Time: 8:47:45 PM
13: */
14: public class ConditionsTestCase extends TestCase {
15: //~ Methods ////////////////////////////////////////////////////////////////
16:
17: public void testNestedCondition() throws Exception {
18: Workflow workflow = new BasicWorkflow("test");
19: long id = workflow.initialize(getClass().getResource(
20: "/samples/nested-condition.xml").toString(), 1, null);
21: int[] availableActions = workflow.getAvailableActions(id, null);
22: assertEquals("Unexpected number of available actions", 1,
23: availableActions.length);
24: assertEquals("Unexpected available action", 2,
25: availableActions[0]);
26: }
27: }
|