]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.simple/src/test/java/org/argeo/slc/core/execution/DefaultModulesMangerTest.java
ExecutionContext transformed to interface; mapping from ExecutionContexts to Threads...
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / test / java / org / argeo / slc / core / execution / DefaultModulesMangerTest.java
index b3a48fd227a42ff12368b5c582f93ef51649c3fa..8a191fcf62dcd65b76e81b09e9ad0c55724bc59f 100644 (file)
@@ -1,7 +1,9 @@
 package org.argeo.slc.core.execution;\r
 \r
 import java.util.ArrayList;\r
+import java.util.HashMap;\r
 import java.util.List;\r
+import java.util.Map;\r
 \r
 import org.argeo.slc.SlcException;\r
 import org.argeo.slc.execution.ExecutionFlowDescriptor;\r
@@ -29,13 +31,18 @@ public class DefaultModulesMangerTest extends AbstractSpringTestCase {
                flow.setModuleVersion("dummyversion");\r
                ExecutionFlowDescriptor executionFlowDescriptor = new ExecutionFlowDescriptor();\r
                executionFlowDescriptor.setName("main");\r
+               Map<String, Object> values = new HashMap<String, Object>();\r
+               values.put("testKey", new PrimitiveValue(\r
+                               PrimitiveSpecAttribute.TYPE_INTEGER, 22));\r
+               executionFlowDescriptor.setValues(values);\r
                flow.setFlowDescriptor(executionFlowDescriptor);\r
                realizedFlows.add(flow);\r
                execution.setRealizedFlows(realizedFlows);\r
                \r
                // create a module\r
                ApplicationContext applicationContext = prepareExecution("applicationContext.xml");\r
-               ExecutionModule module = createExecutionModule(applicationContext);\r
+//             ExecutionModule module = createExecutionModule(applicationContext);\r
+               ExecutionModule module = (ExecutionModule) applicationContext.getBean("executionModule_1");\r
                \r
                // create an Execution Module Manager\r
                DefaultModulesManager manager = new DefaultModulesManager();\r
@@ -51,6 +58,7 @@ public class DefaultModulesMangerTest extends AbstractSpringTestCase {
                        public String getName() {return "dummyname";}\r
                        public String getVersion() {return "dummyversion";}                     \r
                };\r
+               module.setExecutionContext(new MapExecutionContext());\r
                module.setApplicationContext(applicationContext);\r
                return module;\r
        }\r