use of org.alien4cloud.tosca.model.workflow.WorkflowStep in project alien4cloud by alien4cloud.
the class CycleDetectionTest method testTwoSequencedCycles.
/**
* <pre>
*
* c f
* / \ / \
* a -- b -- d -- e -- g
*
* </pre>
*/
@Test()
public void testTwoSequencedCycles() {
WorkflowStep a = wf.addStep(new SimpleStep("a"));
WorkflowStep b = wf.addStep(new SimpleStep("b"));
WorkflowStep c = wf.addStep(new SimpleStep("c"));
WorkflowStep d = wf.addStep(new SimpleStep("d"));
WorkflowStep e = wf.addStep(new SimpleStep("e"));
WorkflowStep f = wf.addStep(new SimpleStep("f"));
WorkflowStep g = wf.addStep(new SimpleStep("g"));
WorkflowUtils.linkSteps(a, b);
WorkflowUtils.linkSteps(b, d);
WorkflowUtils.linkSteps(d, c);
WorkflowUtils.linkSteps(c, b);
WorkflowUtils.linkSteps(d, e);
WorkflowUtils.linkSteps(e, g);
WorkflowUtils.linkSteps(g, f);
WorkflowUtils.linkSteps(f, e);
processValidation(true, 2);
}
use of org.alien4cloud.tosca.model.workflow.WorkflowStep in project alien4cloud by alien4cloud.
the class CycleDetectionTest method testForkJoinNoCycle.
/**
* <pre>
* -- b
* /
* a --
* \
* -- c -- d -- e
* </pre>
*/
@Test
public void testForkJoinNoCycle() {
WorkflowStep a = wf.addStep(new SimpleStep("a"));
WorkflowStep b = wf.addStep(new SimpleStep("b"));
WorkflowStep c = wf.addStep(new SimpleStep("c"));
WorkflowStep d = wf.addStep(new SimpleStep("d"));
WorkflowStep e = wf.addStep(new SimpleStep("e"));
WorkflowUtils.linkSteps(a, b);
WorkflowUtils.linkSteps(a, c);
WorkflowUtils.linkSteps(c, d);
WorkflowUtils.linkSteps(d, e);
processValidation(false, 0);
}
use of org.alien4cloud.tosca.model.workflow.WorkflowStep in project alien4cloud by alien4cloud.
the class CycleDetectionTest method testIndirectCycle.
/**
* <pre>
* --
* / \
* a -- b c
* \ /
* --
* </pre>
*/
@Test
public void testIndirectCycle() {
WorkflowStep a = wf.addStep(new SimpleStep("a"));
WorkflowStep b = wf.addStep(new SimpleStep("b"));
WorkflowStep c = wf.addStep(new SimpleStep("c"));
WorkflowUtils.linkSteps(a, b);
WorkflowUtils.linkSteps(b, c);
WorkflowUtils.linkSteps(c, b);
processValidation(true, 1);
}
use of org.alien4cloud.tosca.model.workflow.WorkflowStep in project alien4cloud by alien4cloud.
the class CycleDetectionTest method test2StepsCycle.
/**
* <pre>
* --
* / \
* a b
* \ /
* --
* </pre>
*/
@Test
public void test2StepsCycle() {
WorkflowStep a = wf.addStep(new SimpleStep("a"));
WorkflowStep b = wf.addStep(new SimpleStep("b"));
WorkflowUtils.linkSteps(a, b);
WorkflowUtils.linkSteps(b, a);
processValidation(true, 1);
}
use of org.alien4cloud.tosca.model.workflow.WorkflowStep in project alien4cloud by alien4cloud.
the class CycleDetectionTest method testTwoParallelCycles.
/**
* <pre>
* --- c
* / \
* -- b ----- d
* /
* a -- f
* \ / \
* -- e -- g
*
* </pre>
*/
@Test()
public void testTwoParallelCycles() {
WorkflowStep a = wf.addStep(new SimpleStep("a"));
WorkflowStep b = wf.addStep(new SimpleStep("b"));
WorkflowStep c = wf.addStep(new SimpleStep("c"));
WorkflowStep d = wf.addStep(new SimpleStep("d"));
WorkflowStep e = wf.addStep(new SimpleStep("e"));
WorkflowStep f = wf.addStep(new SimpleStep("f"));
WorkflowStep g = wf.addStep(new SimpleStep("g"));
WorkflowUtils.linkSteps(a, b);
WorkflowUtils.linkSteps(b, c);
WorkflowUtils.linkSteps(c, d);
WorkflowUtils.linkSteps(d, b);
WorkflowUtils.linkSteps(a, e);
WorkflowUtils.linkSteps(a, e);
WorkflowUtils.linkSteps(e, f);
WorkflowUtils.linkSteps(f, g);
WorkflowUtils.linkSteps(g, e);
processValidation(true, 2);
}
Aggregations