KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > workflow > ConditionsTestCase


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

5 package com.opensymphony.workflow;
6
7 import com.opensymphony.workflow.basic.BasicWorkflow;
8
9 import junit.framework.TestCase;
10
11
12 /**
13  * @author hani Date: May 5, 2004 Time: 8:47:45 PM
14  */

15 public class ConditionsTestCase extends TestCase {
16     //~ Methods ////////////////////////////////////////////////////////////////
17

18     public void testNestedCondition() throws Exception JavaDoc {
19         Workflow workflow = new BasicWorkflow("test");
20         long id = workflow.initialize(getClass().getResource("/samples/nested-condition.xml").toString(), 1, null);
21         int[] availableActions = workflow.getAvailableActions(id, null);
22         assertEquals("Unexpected number of available actions", 1, availableActions.length);
23         assertEquals("Unexpected available action", 2, availableActions[0]);
24     }
25 }
26
Popular Tags