]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - demo/org.argeo.slc.demo.basic/src/test/java/org/argeo/slc/demo/basic/BasicExecutionTest.java
Simplify OSGi
[gpl/argeo-slc.git] / demo / org.argeo.slc.demo.basic / src / test / java / org / argeo / slc / demo / basic / BasicExecutionTest.java
index fc914a16e54dfa04cdc2f795481664728d4e9d4c..0d703cdad424276b633b43106820cdf14d2722c1 100644 (file)
@@ -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, Execut>
+
                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();
        }