X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=demo%2Forg.argeo.slc.demo.basic%2Fsrc%2Ftest%2Fjava%2Forg%2Fargeo%2Fslc%2Fdemo%2Fbasic%2FBasicExecutionTest.java;h=0d703cdad424276b633b43106820cdf14d2722c1;hb=5ca0831fd91542776d1d4a8b51e07b9982bd634e;hp=fc914a16e54dfa04cdc2f795481664728d4e9d4c;hpb=7c01c96d522d85efd262aa441e41677e8fcd386e;p=gpl%2Fargeo-slc.git diff --git a/demo/org.argeo.slc.demo.basic/src/test/java/org/argeo/slc/demo/basic/BasicExecutionTest.java b/demo/org.argeo.slc.demo.basic/src/test/java/org/argeo/slc/demo/basic/BasicExecutionTest.java index fc914a16e..0d703cdad 100644 --- a/demo/org.argeo.slc.demo.basic/src/test/java/org/argeo/slc/demo/basic/BasicExecutionTest.java +++ b/demo/org.argeo.slc.demo.basic/src/test/java/org/argeo/slc/demo/basic/BasicExecutionTest.java @@ -1,22 +1,29 @@ package org.argeo.slc.demo.basic; +import java.util.Map; + import junit.framework.TestCase; import org.argeo.slc.core.execution.ExecutionContext; -import org.argeo.slc.core.execution.NewExecutionEvent; import org.argeo.slc.execution.ExecutionFlow; -import org.argeo.slc.process.SlcExecution; +import org.springframework.beans.factory.generic.GenericBeanFactoryAccessor; import org.springframework.context.support.ClassPathXmlApplicationContext; public class BasicExecutionTest extends TestCase { public void testExecution() throws Exception { - String[] files = { "conf/main.xml", "conf/imports.xml", - "conf/common.xml", "conf/basic.xml", - "conf/testCases/basic-001.xml", "conf/testCases/basic-002.xml" }; + String[] files = { "conf/imports.xml", "conf/common.xml", + "conf/basic.xml", "conf/canonic.xml", + "conf/testCases/basic-001.xml", "conf/testCases/basic-002.xml", + "conf/testCases/canonic-001.xml", + "conf/testCases/canonic-002.xml", "conf/main.xml" }; ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext( files); applicationContext.start(); + // GenericBeanFactoryAccessor accessor = new + // GenericBeanFactoryAccessor(applicationContext); + // Map + String bean = "main"; ExecutionContext.registerExecutionContext(new ExecutionContext()); ExecutionContext.getVariables().put("slc.flows", bean); @@ -24,12 +31,12 @@ public class BasicExecutionTest extends TestCase { .getBean(bean); executionFlow.execute(); -// SlcExecution slcExecution = new SlcExecution(); -// slcExecution.getAttributes().put("slc.flows", "main"); -// applicationContext.publishEvent(new NewExecutionEvent(this, -// slcExecution)); -// -// Thread.sleep(5000); + // SlcExecution slcExecution = new SlcExecution(); + // slcExecution.getAttributes().put("slc.flows", "main"); + // applicationContext.publishEvent(new NewExecutionEvent(this, + // slcExecution)); + // + // Thread.sleep(5000); applicationContext.close(); }