1 5 package com.opensymphony.workflow; 6 7 import com.opensymphony.workflow.basic.BasicWorkflow; 8 9 import junit.framework.TestCase; 10 11 12 15 public class ConditionsTestCase extends TestCase { 16 18 public void testNestedCondition() throws Exception { 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 |