taverna-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From haouech <...@git.apache.org>
Subject [GitHub] incubator-taverna-language pull request #41: Add helper method to create nes...
Date Tue, 07 Aug 2018 21:33:11 GMT
Github user haouech commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-language/pull/41#discussion_r208392734
  
    --- 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 --
    
    I wasn't happy with that way either. I used the ProcessorBinding as you suggested and
it's much better. Thank you for your comments !


---

Mime
View raw message