]> git.argeo.org Git - gpl/argeo-slc.git/blob - legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ExecutionModuleDescriptorCastorTest.java
Move to SLC legacy
[gpl/argeo-slc.git] / legacy / runtime / org.argeo.slc.support.castor / src / test / java / org / argeo / slc / castor / ExecutionModuleDescriptorCastorTest.java
1 /*
2 * Copyright (C) 2007-2012 Mathieu Baudier
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.argeo.slc.castor;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.argeo.slc.execution.ExecutionFlowDescriptor;
22 import org.argeo.slc.execution.ExecutionModuleDescriptor;
23 import org.argeo.slc.execution.ExecutionSpec;
24 import org.argeo.slc.unit.execution.ExecutionFlowDescriptorTestUtils;
25
26 public class ExecutionModuleDescriptorCastorTest extends AbstractCastorTestCase {
27 public void testMarshUnmarsh() throws Exception {
28 ExecutionModuleDescriptor moduleDescriptor = new ExecutionModuleDescriptor();
29 moduleDescriptor.setName("test.module");
30 moduleDescriptor.setVersion("1.0.0");
31 moduleDescriptor.setLabel("Test Module");
32 moduleDescriptor.setDescription("module descriptor");
33
34 ExecutionFlowDescriptor flowDescriptor = ExecutionFlowDescriptorTestUtils
35 .createSimpleExecutionFlowDescriptor();
36
37 List<ExecutionFlowDescriptor> flows = new ArrayList<ExecutionFlowDescriptor>();
38 flows.add(flowDescriptor);
39 moduleDescriptor.setExecutionFlows(flows);
40
41 List<ExecutionSpec> specs = new ArrayList<ExecutionSpec>();
42 specs.add(flowDescriptor.getExecutionSpec());
43 moduleDescriptor.setExecutionSpecs(specs);
44
45 marshUnmarsh(moduleDescriptor, false);
46 }
47
48 public void testMarshUnmarshMini() throws Exception {
49 ExecutionModuleDescriptor moduleDescriptor = new ExecutionModuleDescriptor();
50 moduleDescriptor.setName("test.moodule");
51 moduleDescriptor.setVersion("1.0.0");
52 marshUnmarsh(moduleDescriptor, false);
53 }
54
55 }