Github user stain commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-language/pull/41#discussion_r207914837
--- Diff:
taverna-scufl2-api/src/test/java/org/apache/taverna/scufl2/api/common/TestScufl2Tools.java
---
@@ -63,6 +64,25 @@ public void makeBundle() {
makeWorkflowBundle();
assertNotNull(workflowBundle);
}
+
+ @Test
+ public void testNestedWorkflows() {
+ Workflow child = new Workflow();
+ child.setName("childWorkflow");
+ child.setParent(workflowBundle);
+
+ Workflow mainWorkflow = workflowBundle.getMainWorkflow();
+ Processor processor = new Processor();
+ processor.setParent(mainWorkflow);
+
+ Profile profile = workflowBundle.getMainProfile();
+
+ Scufl2Tools tools = new Scufl2Tools();
+ tools.createNestedRelationship(processor, child, profile);
+ Workflow nested = tools.nestedWorkflowForProcessor(processor,
profile);
+
+ assertEquals(child, nested);
--- End diff --
Could this test also verify that the corresponding `Activity` and
`Configuration` have been added with the correct workflow name and i/o ports?
---