From 0993c4cc230d8493a2aa0b1a4debee5ede35184f Mon Sep 17 00:00:00 2001 From: c00149107 Date: Tue, 19 Sep 2017 15:48:17 +0800 Subject: Add UT for instantiate NS API Add UT for instantiate NS API of VF-C adapter Change-Id: I8460dbe42da485777347f21ab608b9592c225ad8 Issue-ID:SO-133 Signed-off-by: c00149107 --- .../test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'adapters/mso-vfc-adapter/src/test/java/org') 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..1777dea0dc 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,8 +95,10 @@ 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 if(url.contains("instantiate") && methodType.equals(CommonConstant.MethodType.POST)) { + return getResponse("instantiateNsRsp.json"); } else { return null; } @@ -180,7 +182,9 @@ public class VfcAdapterTest { @Test public void instantiateTest() { - + // get request + mockRestfulUtil(FILE_PATH + "instantiateNsReq.json"); + vfcAdapter.instantiateNfvoNs(null, "9b9f02c0-298b-458a-bc9c-be3692e4f354"); } @Test -- cgit 1.2.3-korg