summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorMatthieu Geerebaert <matthieu.geerebaert@orange.com>2018-04-23 14:14:55 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-23 14:14:55 +0000
commit0d31f4100b577a231649e48e02ab7d96ce8a0699 (patch)
tree980f7f04022b31a5e9c8234714785586a5afff85 /src/test
parent71e7ffef63a2e998541a4ba68f832ec5c7dfcb5f (diff)
parente0a1b2fb28cb5ef24d9d670832136bb57820c3e1 (diff)
Merge "fix NPE serviceOrder"
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 563760e..937f417 100644
--- a/src/test/java/org/onap/nbi/apis/ApiTest.java
+++ b/src/test/java/org/onap/nbi/apis/ApiTest.java
@@ -289,6 +289,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 {