1 17 package org.apache.servicemix.beanflow; 18 19 import org.apache.commons.logging.Log; 20 import org.apache.commons.logging.LogFactory; 21 import org.apache.servicemix.beanflow.util.ActivityTestSupport; 22 23 import java.util.concurrent.TimeUnit ; 24 25 29 public class WorkflowTest extends ActivityTestSupport { 30 31 private static final Log log = LogFactory.getLog(WorkflowTest.class); 32 33 public void testWorkflow() throws Exception { 34 ExampleWorkflow workflow = new ExampleWorkflow(); 36 workflow.start(); 37 38 Thread.sleep(2000); 40 41 workflow.userEntered("foo"); 42 assertStarted(workflow); 43 44 log.info("We are entering some valid input"); 45 46 workflow.userEntered("foo@bar.com"); 47 48 workflow.join(10, TimeUnit.SECONDS); 49 50 assertStopped(workflow); 51 } 52 } 53 | Popular Tags |