1 package org
.argeo
.slc
.demo
.basic
;
5 import junit
.framework
.TestCase
;
7 import org
.argeo
.slc
.core
.execution
.ExecutionContext
;
8 import org
.argeo
.slc
.execution
.ExecutionFlow
;
9 import org
.springframework
.beans
.factory
.generic
.GenericBeanFactoryAccessor
;
10 import org
.springframework
.context
.support
.ClassPathXmlApplicationContext
;
12 public class BasicExecutionTest
extends TestCase
{
13 public void testExecution() throws Exception
{
14 String
[] files
= { "conf/imports.xml", "conf/common.xml",
15 "conf/basic.xml", "conf/canonic.xml",
16 "conf/testCases/basic-001.xml", "conf/testCases/basic-002.xml",
17 "conf/testCases/canonic-001.xml",
18 "conf/testCases/canonic-002.xml", "conf/main.xml" };
19 ClassPathXmlApplicationContext applicationContext
= new ClassPathXmlApplicationContext(
21 applicationContext
.start();
23 // GenericBeanFactoryAccessor accessor = new
24 // GenericBeanFactoryAccessor(applicationContext);
25 // Map<String, Execut>
28 ExecutionContext
.registerExecutionContext(new ExecutionContext());
29 ExecutionContext
.getVariables().put("slc.flows", bean
);
30 ExecutionFlow executionFlow
= (ExecutionFlow
) applicationContext
32 executionFlow
.execute();
34 // SlcExecution slcExecution = new SlcExecution();
35 // slcExecution.getAttributes().put("slc.flows", "main");
36 // applicationContext.publishEvent(new NewExecutionEvent(this,
39 // Thread.sleep(5000);
41 applicationContext
.close();