X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=runtime%2Forg.argeo.slc.unit%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Funit%2Fprocess%2FSlcExecutionTestUtils.java;fp=runtime%2Forg.argeo.slc.unit%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Funit%2Fprocess%2FSlcExecutionTestUtils.java;h=e83f1cb8ab2b744f9607476b5fd586fae5124799;hb=ff9d53c89ae7c9e7617d3297d2f82508a6c0acbb;hp=8bf94160175e87784f2ed313bda2c8582b90af3f;hpb=b376cfc0c90c738d1ee4d01643dd215cb1d202c8;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.unit/src/main/java/org/argeo/slc/unit/process/SlcExecutionTestUtils.java b/runtime/org.argeo.slc.unit/src/main/java/org/argeo/slc/unit/process/SlcExecutionTestUtils.java index 8bf941601..e83f1cb8a 100644 --- a/runtime/org.argeo.slc.unit/src/main/java/org/argeo/slc/unit/process/SlcExecutionTestUtils.java +++ b/runtime/org.argeo.slc.unit/src/main/java/org/argeo/slc/unit/process/SlcExecutionTestUtils.java @@ -4,10 +4,15 @@ import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertNotNull; import static org.argeo.slc.unit.UnitUtils.assertDateSec; +import java.util.ArrayList; +import java.util.List; import java.util.UUID; +import org.argeo.slc.execution.ExecutionFlowDescriptor; +import org.argeo.slc.process.RealizedFlow; import org.argeo.slc.process.SlcExecution; import org.argeo.slc.process.SlcExecutionStep; +import org.argeo.slc.unit.execution.ExecutionFlowDescriptorTestUtils; public abstract class SlcExecutionTestUtils { @@ -22,6 +27,21 @@ public abstract class SlcExecutionTestUtils { return slcExec; } + public static SlcExecution createSlcExecutionWithRealizedFlows() { + SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution(); + List realizedFlows = new ArrayList(); + RealizedFlow realizedFlow = new RealizedFlow(); + ExecutionFlowDescriptor flowDescriptor = ExecutionFlowDescriptorTestUtils + .createSimpleExecutionFlowDescriptor(); + realizedFlow.setModuleName("test.module"); + realizedFlow.setModuleVersion("1.0.0"); + realizedFlow.setFlowDescriptor(flowDescriptor); + realizedFlow.setExecutionSpec(flowDescriptor.getExecutionSpec()); + realizedFlows.add(realizedFlow); + slcExec.setRealizedFlows(realizedFlows); + return slcExec; + } + public static void assertSlcExecution(SlcExecution expected, SlcExecution reached) { assertNotNull(reached);