]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionModuleDescriptorCastorTest.java
Implement ref spec
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.castor / src / test / java / org / argeo / slc / castor / ExecutionModuleDescriptorCastorTest.java
1 package org.argeo.slc.castor;
2
3 import java.util.ArrayList;
4 import java.util.List;
5
6 import org.argeo.slc.execution.ExecutionFlowDescriptor;
7 import org.argeo.slc.execution.ExecutionModuleDescriptor;
8 import org.argeo.slc.execution.ExecutionSpec;
9 import org.argeo.slc.unit.execution.ExecutionFlowDescriptorTestUtils;
10
11 public class ExecutionModuleDescriptorCastorTest extends AbstractCastorTestCase {
12 public void testMarshUnmarsh() throws Exception {
13 ExecutionModuleDescriptor moduleDescriptor = new ExecutionModuleDescriptor();
14 moduleDescriptor.setName("test.module");
15 moduleDescriptor.setVersion("1.0.0");
16 moduleDescriptor.setLabel("Test Module");
17 moduleDescriptor.setDescription("module descriptor");
18
19 ExecutionFlowDescriptor flowDescriptor = ExecutionFlowDescriptorTestUtils
20 .createSimpleExecutionFlowDescriptor();
21
22 List<ExecutionFlowDescriptor> flows = new ArrayList<ExecutionFlowDescriptor>();
23 flows.add(flowDescriptor);
24 moduleDescriptor.setExecutionFlows(flows);
25
26 List<ExecutionSpec> specs = new ArrayList<ExecutionSpec>();
27 specs.add(flowDescriptor.getExecutionSpec());
28 moduleDescriptor.setExecutionSpecs(specs);
29
30 marshUnmarsh(moduleDescriptor, false);
31 }
32
33 public void testMarshUnmarshMini() throws Exception {
34 ExecutionModuleDescriptor moduleDescriptor = new ExecutionModuleDescriptor();
35 moduleDescriptor.setName("test.moodule");
36 moduleDescriptor.setVersion("1.0.0");
37 marshUnmarsh(moduleDescriptor, false);
38 }
39
40 }