summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorromaingimbert <romain.gimbert@orange.com>2018-04-23 15:59:07 +0200
committerromaingimbert <romain.gimbert@orange.com>2018-04-23 15:59:07 +0200
commite0a1b2fb28cb5ef24d9d670832136bb57820c3e1 (patch)
treeb50481a1d1e1053bfb18a1b3c7117f18ffb8d81f /src/test
parent8252e55861286bfea1aa910b6a543cdbdde15808 (diff)
fix NPE serviceOrder
-test when relatedParty is not passed, get generic customer Change-Id: Iebe542354c7ddf694c8d2b8e1b4aa3e03ce823f4 Issue-ID: EXTAPI-61 Signed-off-by: romaingimbert <romain.gimbert@orange.com>
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/nbi/apis/ApiTest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/java/org/onap/nbi/apis/ApiTest.java b/src/test/java/org/onap/nbi/apis/ApiTest.java
index c65f60b..ceb29e7 100644
--- a/src/test/java/org/onap/nbi/apis/ApiTest.java
+++ b/src/test/java/org/onap/nbi/apis/ApiTest.java
@@ -276,6 +276,24 @@ public class ApiTest {
}
+
+ @Test
+ public void testCheckServiceOrderWithoutRelatedParty() throws Exception {
+
+ ServiceOrder testServiceOrder = ServiceOrderAssertions.createTestServiceOrder(ActionType.ADD);
+ testServiceOrder.setRelatedParty(null);
+ testServiceOrder.setState(StateType.ACKNOWLEDGED);
+ testServiceOrder.setId("test");
+ serviceOrderRepository.save(testServiceOrder);
+
+ serviceOrderResource.scheduleCheckServiceOrders();
+
+ ServiceOrder serviceOrderChecked = serviceOrderRepository.findOne("test");
+ assertThat(serviceOrderChecked.getState()).isEqualTo(StateType.ACKNOWLEDGED);
+
+
+ }
+
@Test
public void testCheckServiceOrderWithUnKnonwCustomer() throws Exception {