diff options
author | arun chapagain <arun.chapagain@huawei.com> | 2020-09-01 10:11:35 +0530 |
---|---|---|
committer | arun chapagain <arun.chapagain@huawei.com> | 2020-09-01 10:11:35 +0530 |
commit | ec7b4ae6da9a4a3201da28c8189b44ef3aea71d5 (patch) | |
tree | 364ffec05a257fb06c3b0af33cce1c6162a2a59b /huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/servicetoken/VNFRestfulUtilTest.java | |
parent | 69f3a1d8ec1e10d59f3f52062729b2bf45887fe4 (diff) |
Junit coverage increased
Issue-ID: VFC-1726
Signed-off-by: arun chapagain <arun.chapagain@huawei.com>
Change-Id: Ifef9b4972edb0723c35f4dce791dafd6efe4927c
Diffstat (limited to 'huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/servicetoken/VNFRestfulUtilTest.java')
-rw-r--r-- | huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/servicetoken/VNFRestfulUtilTest.java | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/servicetoken/VNFRestfulUtilTest.java b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/servicetoken/VNFRestfulUtilTest.java index 2bdbc11d..929733e9 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/servicetoken/VNFRestfulUtilTest.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/servicetoken/VNFRestfulUtilTest.java @@ -83,17 +83,17 @@ public class VNFRestfulUtilTest { } @Test public void sendReqToAppTest(){ - new MockUp<VNFRestfulUtil>(){ - @Mock - public RestfulResponse getRestResByDefault(String path, String methodNames, JSONObject bodyParam) { - RestfulResponse resp = new RestfulResponse(); - resp.setStatus(200); - Map<String,Object> map = new HashMap<>(); - map.put("retCode", 1); - resp.setResponseJson(toJson(map)); - return resp; - } - }; +// new MockUp<VNFRestfulUtil>(){ +// @Mock +// public RestfulResponse getRestResByDefault(String path, String methodNames, JSONObject bodyParam) { +// RestfulResponse resp = new RestfulResponse(); +// resp.setStatus(200); +// Map<String,Object> map = new HashMap<>(); +// map.put("retCode", 1); +// resp.setResponseJson(toJson(map)); +// return resp; +// } +// }; String path="http://localhost:8080/vnfdmgr/v1"; String methodNames = "get"; JSONObject bodyParam = new JSONObject(); @@ -104,17 +104,17 @@ public class VNFRestfulUtilTest { @Test public void sendReqToAppTest2(){ - new MockUp<VNFRestfulUtil>(){ - @Mock - public RestfulResponse getRestResByDefault(String path, String methodNames, JSONObject bodyParam) { - RestfulResponse resp = new RestfulResponse(); - resp.setStatus(200); - Map<String,Object> map = new HashMap<>(); - map.put("retCode", -1); - resp.setResponseJson(toJson(map)); - return resp; - } - }; +// new MockUp<VNFRestfulUtil>(){ +// @Mock +// public RestfulResponse getRestResByDefault(String path, String methodNames, JSONObject bodyParam) { +// RestfulResponse resp = new RestfulResponse(); +// resp.setStatus(200); +// Map<String,Object> map = new HashMap<>(); +// map.put("retCode", -1); +// resp.setResponseJson(toJson(map)); +// return resp; +// } +// }; String path="http://localhost:8080/vnfdmgr/v1"; String methodNames = "get"; JSONObject bodyParam = new JSONObject(); @@ -124,17 +124,17 @@ public class VNFRestfulUtilTest { } @Test public void sendReqToAppTest3(){ - new MockUp<VNFRestfulUtil>(){ - @Mock - public RestfulResponse getRestResByDefault(String path, String methodNames, JSONObject bodyParam) { - RestfulResponse resp = new RestfulResponse(); - resp.setStatus(500); - Map<String,Object> map = new HashMap<>(); - map.put("retCode", -1); - resp.setResponseJson(toJson(map)); - return resp; - } - }; +// new MockUp<VNFRestfulUtil>(){ +// @Mock +// public RestfulResponse getRestResByDefault(String path, String methodNames, JSONObject bodyParam) { +// RestfulResponse resp = new RestfulResponse(); +// resp.setStatus(500); +// Map<String,Object> map = new HashMap<>(); +// map.put("retCode", -1); +// resp.setResponseJson(toJson(map)); +// return resp; +// } +// }; String path="http://localhost:8080/vnfdmgr/v1"; String methodNames = "get"; JSONObject bodyParam = new JSONObject(); |