2 * Copyright (C) 2007-2012 Mathieu Baudier
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org
.argeo
.slc
.castor
;
18 import java
.util
.ArrayList
;
19 import java
.util
.List
;
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
;
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");
34 ExecutionFlowDescriptor flowDescriptor
= ExecutionFlowDescriptorTestUtils
35 .createSimpleExecutionFlowDescriptor();
37 List
<ExecutionFlowDescriptor
> flows
= new ArrayList
<ExecutionFlowDescriptor
>();
38 flows
.add(flowDescriptor
);
39 moduleDescriptor
.setExecutionFlows(flows
);
41 List
<ExecutionSpec
> specs
= new ArrayList
<ExecutionSpec
>();
42 specs
.add(flowDescriptor
.getExecutionSpec());
43 moduleDescriptor
.setExecutionSpecs(specs
);
45 marshUnmarsh(moduleDescriptor
, false);
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);