summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/test/java/org/onap
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-03-14 16:02:18 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-03-14 16:03:06 -0400
commit0b906b0de95725879fd1cc7ad585d71c502eebd9 (patch)
tree40a19fd268fe177e806afa69771b61a308046266 /bpmn/so-bpmn-tasks/src/test/java/org/onap
parentff8c5e9f78b46f29c08576393438e902ea6d8cd6 (diff)
Added vnfc support to BB layer
added vnfc to gbb for execute bb and bb layer enhance workflow action layer to handle vnfcs Change-Id: I0d39c3aefe66180ed6f2b75a0c946e07ca603261 Issue-ID: SO-1658 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test/java/org/onap')
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionUnitTest.java75
1 files changed, 0 insertions, 75 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionUnitTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionUnitTest.java
index 8195cd58c0..5c083779be 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionUnitTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionUnitTest.java
@@ -83,54 +83,6 @@ public class WorkflowActionUnitTest {
private WorkflowAction workflowAction;
@Test
- public void filterOrchFlowsHasFabricTest() {
-
- List<OrchestrationFlow> flows = createFlowList(
- "DeactivateFabricConfigurationBB",
- "flow x",
- "flow y",
- "ActivateFabricConfigurationBB",
- "flow z");
- doReturn(Arrays.asList("yes", "yes")).when(workflowAction).traverseCatalogDbForConfiguration(ArgumentMatchers.any(String.class), ArgumentMatchers.isNull());
-
- ServiceInstancesRequest sIRequest = new ServiceInstancesRequest();
- RequestDetails requestDetails = new RequestDetails();
- ModelInfo modelInfo = new ModelInfo();
- requestDetails.setModelInfo(modelInfo);
- RelatedInstance relatedInstance = new RelatedInstance();
- sIRequest.setRequestDetails(requestDetails);
-
- List<OrchestrationFlow> result = workflowAction.filterOrchFlows(sIRequest, flows, WorkflowType.VFMODULE, mock(DelegateExecution.class));
-
- assertThat(result, is(flows));
- }
-
- @Test
- public void filterOrchFlowNoFabricTest() {
- List<OrchestrationFlow> flows = createFlowList(
- "DeactivateFabricConfigurationBB",
- "flow x",
- "flow y",
- "ActivateFabricConfigurationBB",
- "flow z");
-
- ServiceInstancesRequest sIRequest = new ServiceInstancesRequest();
- RequestDetails requestDetails = new RequestDetails();
- ModelInfo modelInfo = new ModelInfo();
- modelInfo.setModelCustomizationUuid("");
- requestDetails.setModelInfo(modelInfo);
- sIRequest.setRequestDetails(requestDetails);
-
- List<OrchestrationFlow> result = workflowAction.filterOrchFlows(sIRequest, flows, WorkflowType.VFMODULE, mock(DelegateExecution.class));
- List<OrchestrationFlow> expected = createFlowList(
- "flow x",
- "flow y",
- "flow z");
-
- assertThat(result, is(expected));
- }
-
- @Test
public void traverseCatalogDbForConfigurationTest() {
CvnfcCustomization cvnfcCustomization = new CvnfcCustomization();
@@ -150,33 +102,6 @@ public class WorkflowActionUnitTest {
}
- @Test
- public void verifyFilterOrchInvocation() throws Exception {
- DelegateExecution execution = mock(DelegateExecution.class);
-
- when(execution.getVariable(eq("aLaCarte"))).thenReturn(true);
- when(execution.getVariable(eq("bpmnRequest"))).thenReturn(getJson("ServiceMacroAssign.json"));
- when(execution.getVariable(eq("requestUri"))).thenReturn("/v6/serviceInstances/123/vnfs/1234");
-
- OrchestrationFlow flow = new OrchestrationFlow();
- flow.setFlowName("flow x");
-
- List<OrchestrationFlow> flows = Arrays.asList(flow);
- doReturn(Arrays.asList(flow)).when(workflowAction).queryNorthBoundRequestCatalogDb(any(), any(), any(), anyBoolean(), any(), any());
- workflowAction.selectExecutionList(execution);
-
- verify(workflowAction, times(1)).filterOrchFlows(any(), eq(flows), any(), any());
-
- flow = new OrchestrationFlow();
- flow.setFlowName("flow y");
- flows = Arrays.asList(flow);
- when(execution.getVariable(eq("aLaCarte"))).thenReturn(false);
- workflowAction.selectExecutionList(execution);
-
- verify(workflowAction, never()).filterOrchFlows(any(), eq(flows), any(), any());
-
- }
-
private String getJson(String filename) throws IOException {
return new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + filename)));
}