}
@Test
public void testPairing() throws Exception {
Workflow workflow = WorkflowParser.parseYAML("src/test/resources/Pairing.yaml");
ResourceSpace resourceSpace = new ResourceSpace();
ExecutionProfile localExecutionProfile = new LocalExecutionProfile();
Orchestrator platformOrchestrator = new Orchestrator(workflow, localExecutionProfile, resourceSpace);
platformOrchestrator.orchestrate();
for(Module m : workflow.modules()){
for(ModuleInstance mi : m.instances()){
System.out.println("Instance Input");
for(InstanceInput io : mi.inputs())
System.out.print(" " +io.name()+":"+io.value()+ " ");
System.out.println("Instance Output");
for(InstanceOutput io : mi.outputs())
System.out.print(" " +io.name()+":"+io.value()+ " ");
}
}
assertEquals(2, workflow.getModuleByName("A").instances().size());
assertEquals(3, workflow.getModuleByName("B").instances().size());
assertEquals(5, workflow.getModuleByName("C").instances().size());
}