diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2017-09-19 09:19:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-09-19 09:19:02 +0000 |
commit | c28024b4b4258e510583b572f6d84dd55d2624a3 (patch) | |
tree | 03232d92ed6d2318e02fbe4fde910b1300b526d6 /adapters/mso-vfc-adapter/src/test | |
parent | f5886ace0971372d0173bf7f53c56c0d2cccbfcd (diff) | |
parent | 870f0cad8d076f95dc66b2dddd2c2f13d18ff4d1 (diff) |
Merge "Add terminate UT for vf-c adapter"
Diffstat (limited to 'adapters/mso-vfc-adapter/src/test')
-rw-r--r-- | adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java | 8 | ||||
-rw-r--r-- | adapters/mso-vfc-adapter/src/test/resources/json/terminateNsReq.json | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java b/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java index dc07a3cb36..f17c7215cf 100644 --- a/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java +++ b/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java @@ -101,7 +101,10 @@ public class VfcAdapterTest { return getResponse("instantiateNsRsp.json"); } else if(methodType.equals(CommonConstant.MethodType.DELETE)) { return getResponse(null); - }else { + } else if(url.contains("terminate") && methodType.equals(CommonConstant.MethodType.POST)) { + return getResponse("terminateNsRsp.json"); + } + else { return null; } } @@ -193,7 +196,8 @@ public class VfcAdapterTest { @Test public void terminateTest() { - + mockRestfulUtil(FILE_PATH + "terminateNsReq.json"); + vfcAdapter.terminateNfvoNs(null, "9b9f02c0-298b-458a-bc9c-be3692e4f354"); } @Test diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsReq.json b/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsReq.json index 4f7c29f9d0..ac095e6aa3 100644 --- a/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsReq.json +++ b/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsReq.json @@ -1,4 +1,6 @@ { + "globalSubscriberId":"9b9f02c0-298b-458a-bc9c-be3692e4f350", + "serviceType":"service", "serviceId":"9b9f02c0-298b-458a-bc9c-be3692e4f351", "operationId":"9b9f02c0-298b-458a-bc9c-be3692e4f352", "nodeTemplateUUID":"9b9f02c0-298b-458a-bc9c-be3692e4f353" |