diff options
author | Marcus Williams <marcus.williams@intel.com> | 2018-12-05 18:14:09 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-12-05 18:14:09 +0000 |
commit | 3b22842f0065b5fb3b8bc28974f974646d4b46cc (patch) | |
tree | 793682282d95bb1ec80d71bc2bcba749ce6471c8 /bpmn/so-bpmn-tasks/src/test/java | |
parent | d2589e832d2235e5ae5b8b376467eb6427f821e6 (diff) | |
parent | c5876cf77fc71e11f2f66dc308cde68d729261b4 (diff) |
Merge "Always UnAssign"
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/sdnc/tasks/SDNCUnassignTasksTest.java | 57 |
1 files changed, 1 insertions, 56 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasksTest.java index da8ea8f58c..07f03b592b 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasksTest.java @@ -88,16 +88,7 @@ public class SDNCUnassignTasksTest extends BaseTaskTest{ verify(sdncServiceInstanceResources, times(1)).unassignServiceInstance(serviceInstance, customer, requestContext); } - @Test - public void unassignServiceInstanceTest_inventoried() throws Exception { - doReturn("test").when(sdncServiceInstanceResources).unassignServiceInstance(serviceInstance, customer, requestContext); - - serviceInstance.setOrchestrationStatus(OrchestrationStatus.INVENTORIED); - - sdncUnassignTasks.unassignServiceInstance(execution); - - verify(sdncServiceInstanceResources, times(0)).unassignServiceInstance(serviceInstance, customer, requestContext); - } + @Test public void unassignServiceInstanceExceptionTest() throws Exception { @@ -118,26 +109,9 @@ public class SDNCUnassignTasksTest extends BaseTaskTest{ assertEquals("response", execution.getVariable("SDNCResponse")); } - @Test - public void unassignVfModuleTest_inventoried() throws Exception { - vfModule.setOrchestrationStatus(OrchestrationStatus.INVENTORIED); - - sdncUnassignTasks.unassignVfModule(execution); - verify(sdncVfModuleResources, times(0)).unassignVfModule(vfModule, genericVnf, serviceInstance); - assertNull(execution.getVariable("SDNCResponse")); - } - @Test - public void unassignVfModuleTest_pendingCreate() throws Exception { - vfModule.setOrchestrationStatus(OrchestrationStatus.PENDING_CREATE); - - sdncUnassignTasks.unassignVfModule(execution); - verify(sdncVfModuleResources, times(0)).unassignVfModule(vfModule, genericVnf, serviceInstance); - assertNull(execution.getVariable("SDNCResponse")); - } - @Test public void unassignVfModuleExceptionTest() throws Exception { expectedException.expect(BpmnError.class); @@ -157,25 +131,6 @@ public class SDNCUnassignTasksTest extends BaseTaskTest{ assertTrue(execution.getVariable("sdncUnassignVnfResponse").equals("response")); } - @Test - public void unassignVnfTest_inventoried() throws Exception { - genericVnf.setOrchestrationStatus(OrchestrationStatus.INVENTORIED); - - sdncUnassignTasks.unassignVnf(execution); - - verify(sdncVnfResources, times(0)).unassignVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext); - assertNull(execution.getVariable("sdncUnassignVnfResponse")); - } - - @Test - public void unassignVnfTest_created() throws Exception { - genericVnf.setOrchestrationStatus(OrchestrationStatus.CREATED); - - sdncUnassignTasks.unassignVnf(execution); - - verify(sdncVnfResources, times(0)).unassignVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext); - assertNull(execution.getVariable("sdncUnassignVnfResponse")); - } @Test public void unassignVnfExceptionTest() throws Exception { @@ -201,14 +156,4 @@ public class SDNCUnassignTasksTest extends BaseTaskTest{ assertEquals("response", execution.getVariable("SDNCUnAssignNetworkResponse")); assertEquals(cloudRegionSdnc, cloudRegion.getLcpCloudRegionId()); } - - @Test - public void unassignNetworkTest_inventoried() throws Exception { - network.setOrchestrationStatus(OrchestrationStatus.INVENTORIED); - - sdncUnassignTasks.unassignNetwork(execution); - - verify(sdncNetworkResources, times(0)).unassignNetwork(network, serviceInstance, customer, requestContext, cloudRegion); - assertNull(execution.getVariable("SDNCUnAssignNetworkResponse")); - } } |