aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/test/java
diff options
context:
space:
mode:
authorSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-12-04 13:35:01 -0500
committerSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-12-05 08:24:29 -0500
commitc5876cf77fc71e11f2f66dc308cde68d729261b4 (patch)
tree8b95b62171b40b5af2e99d58161d1ad54ffe5de8 /bpmn/so-bpmn-tasks/src/test/java
parent9a3841eadc588c3b3f50f2351b741edd139ca13c (diff)
Always UnAssign
Removed logic to skip unassign sdnc in rollback flows Properly merge UT Class to remove test cases no longer needed Change-Id: I5041d6c828003aee953fb0cff3ac9e99f608ef10 Issue-ID: SO-1268 Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
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.java57
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"));
- }
}