diff options
author | Steve Smokowski <ss835w@att.com> | 2019-01-12 13:13:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-01-12 13:13:34 +0000 |
commit | 0d0590405f93472866a910a8f4164781844e9101 (patch) | |
tree | 92f0ca87b7df7d35ce4bdb62f06e7fdaa2ce32a0 /bpmn/so-bpmn-tasks/src/test/java | |
parent | 6d374cb95381eeba807689f09abeca5ccd79fc9a (diff) | |
parent | cd85fa3ff3322c0990430efe55dedc2f7577ee6b (diff) |
Merge "Miscellaneous fixes"
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test/java')
-rw-r--r-- | bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java index 5699c94137..72f0ce4e6d 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java @@ -1200,6 +1200,24 @@ public class WorkflowActionTest extends BaseTaskTest { assertEquals("111",result.get(2).getResourceId()); } + @Test + public void sortVfModulesByBaseLastTest(){ + List<Resource> resources = new ArrayList<>(); + Resource resource1 = new Resource(WorkflowType.VFMODULE,"111",false); + resource1.setBaseVfModule(true); + resources.add(resource1); + Resource resource2 = new Resource(WorkflowType.VFMODULE,"222",false); + resource2.setBaseVfModule(false); + resources.add(resource2); + Resource resource3 = new Resource(WorkflowType.VFMODULE,"333",false); + resource3.setBaseVfModule(false); + resources.add(resource3); + List<Resource> result = workflowAction.sortVfModulesByBaseLast(resources); + assertEquals("333",result.get(0).getResourceId()); + assertEquals("222",result.get(1).getResourceId()); + assertEquals("111",result.get(2).getResourceId()); + } + private List<OrchestrationFlow> createFlowList (String... flowNames){ List<OrchestrationFlow> result = new ArrayList<>(); for(String flowName : flowNames){ |