diff options
Diffstat (limited to 'adapters/mso-vfc-adapter/src/test/java')
-rw-r--r-- | adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java | 22 |
1 files changed, 17 insertions, 5 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 4c316f3196..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 @@ -95,9 +95,16 @@ public class VfcAdapterTest { */ @Mock public RestfulResponse send(String url, String methodType, String content) { - if(url.contains(CommonConstant.NFVO_CREATE_URL) && methodType.equals(CommonConstant.MethodType.POST)) { + if(url.equals(CommonConstant.NFVO_CREATE_URL) && methodType.equals(CommonConstant.MethodType.POST)) { return getResponse("createNsRsp.json"); - } else { + } else if(url.contains("instantiate") && methodType.equals(CommonConstant.MethodType.POST)) { + return getResponse("instantiateNsRsp.json"); + } else if(methodType.equals(CommonConstant.MethodType.DELETE)) { + return getResponse(null); + } else if(url.contains("terminate") && methodType.equals(CommonConstant.MethodType.POST)) { + return getResponse("terminateNsRsp.json"); + } + else { return null; } } @@ -175,17 +182,22 @@ public class VfcAdapterTest { @Test public void deleteTest() { - + // get request + mockRestfulUtil(FILE_PATH + "deleteNsReq.json"); + vfcAdapter.deleteNfvoNs(null, "9b9f02c0-298b-458a-bc9c-be3692e4f354"); } @Test public void instantiateTest() { - + // get request + mockRestfulUtil(FILE_PATH + "instantiateNsReq.json"); + vfcAdapter.instantiateNfvoNs(null, "9b9f02c0-298b-458a-bc9c-be3692e4f354"); } @Test public void terminateTest() { - + mockRestfulUtil(FILE_PATH + "terminateNsReq.json"); + vfcAdapter.terminateNfvoNs(null, "9b9f02c0-298b-458a-bc9c-be3692e4f354"); } @Test |