aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org')
-rw-r--r--src/test/java/org/onap/nbi/apis/ApiTest.java34
1 files changed, 26 insertions, 8 deletions
diff --git a/src/test/java/org/onap/nbi/apis/ApiTest.java b/src/test/java/org/onap/nbi/apis/ApiTest.java
index ef285a4..a650ab5 100644
--- a/src/test/java/org/onap/nbi/apis/ApiTest.java
+++ b/src/test/java/org/onap/nbi/apis/ApiTest.java
@@ -622,8 +622,8 @@ public class ApiTest {
}
- executionTaskB = getExecutionTask("B");
- assertThat(executionTaskB).isNull();
+ assertThat(executionTaskRepository.count()).isEqualTo(0);
+
}
@@ -661,8 +661,8 @@ public class ApiTest {
}
- executionTaskB = getExecutionTask("B");
- assertThat(executionTaskB).isNull();
+ assertThat(executionTaskRepository.count()).isEqualTo(0);
+
}
@@ -702,8 +702,7 @@ public class ApiTest {
}
- ExecutionTask executionTaskB = executionTaskRepository.findOne(Long.parseLong("2"));
- assertThat(executionTaskB).isNull();
+ assertThat(executionTaskRepository.count()).isEqualTo(0);
}
@@ -727,11 +726,30 @@ public class ApiTest {
assertThat(serviceOrderItem.getState()).isEqualTo(StateType.FAILED);
}
- ExecutionTask executionTaskB = executionTaskRepository.findOne(Long.parseLong("2"));
- assertThat(executionTaskB).isNull();
+ assertThat(executionTaskRepository.count()).isEqualTo(0);
+
}
+ @Test
+ public void testExecutionTaskFailedNoSoAndStatusResponse() throws Exception {
+
+ ExecutionTask executionTaskA = ServiceOrderAssertions.setUpBddForExecutionTaskSucess(serviceOrderRepository,
+ executionTaskRepository, ActionType.ADD);
+
+ removeWireMockMapping("/ecomp/mso/infra/serviceInstances/v4");
+ removeWireMockMapping("/ecomp/mso/infra/orchestrationRequests/v4/requestId");
+
+ SoTaskProcessor.processOrderItem(executionTaskA);
+ ServiceOrder serviceOrderChecked = serviceOrderRepository.findOne("test");
+ assertThat(serviceOrderChecked.getState()).isEqualTo(StateType.FAILED);
+ for (ServiceOrderItem serviceOrderItem : serviceOrderChecked.getOrderItem()) {
+ assertThat(serviceOrderItem.getState()).isEqualTo(StateType.FAILED);
+ }
+
+ assertThat(executionTaskRepository.count()).isEqualTo(0);
+
+ }
}