From 57993b16f2db6a5f5ecd7d0fb7065d4823c9854a Mon Sep 17 00:00:00 2001 From: luxin Date: Tue, 10 Apr 2018 15:27:15 +0800 Subject: Add ip Info in query VNF result Change-Id: I4273d147f6522929935087ad9235089be7ca853e Issue-ID: VFC-868 Signed-off-by: luxin --- .../vnfmadapter/service/process/VnfMgrTest.java | 7 +++--- .../svnfm/vnfmadapter/service/rest/VnfRoaTest.java | 28 +++++++++++----------- 2 files changed, 18 insertions(+), 17 deletions(-) (limited to 'huawei/vnfmadapter/VnfmadapterService/service/src/test/java') diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/VnfMgrTest.java b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/VnfMgrTest.java index 075f7ef8..7e34e79e 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/VnfMgrTest.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/VnfMgrTest.java @@ -19,6 +19,7 @@ package org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import java.io.IOException; import java.util.Map; import org.junit.Before; @@ -239,7 +240,7 @@ public class VnfMgrTest { } @Test - public void testGetVnf() { + public void testGetVnf() throws IOException { new MockUp() { @Mock @@ -296,7 +297,7 @@ public class VnfMgrTest { } @Test - public void testGetVnfFail() { + public void testGetVnfFail() throws IOException { new MockUp() { @Mock @@ -313,7 +314,7 @@ public class VnfMgrTest { } @Test - public void testGetVnfFail1() { + public void testGetVnfFail1() throws IOException { new MockUp() { @Mock diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoaTest.java b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoaTest.java index 8012b5cb..4ec0110c 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoaTest.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoaTest.java @@ -16,12 +16,10 @@ package org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - +import mockit.Mock; +import mockit.MockUp; +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -31,10 +29,12 @@ import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.common.restclient.ServiceExcepti import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.constant.Constant; import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.VnfMgr; -import mockit.Mock; -import mockit.MockUp; -import net.sf.json.JSONArray; -import net.sf.json.JSONObject; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; public class VnfRoaTest { @@ -284,7 +284,7 @@ public class VnfRoaTest { } @Test - public void testGetVnfByVnfIdIsEmpty() throws ServiceException { + public void testGetVnfByVnfIdIsEmpty() throws IOException, ServiceException { final JSONObject restJson = new JSONObject(); MockUp proxyStub = new MockUp() {}; HttpServletRequest mockInstance = proxyStub.getMockInstance(); @@ -307,7 +307,7 @@ public class VnfRoaTest { } @Test - public void testGetVnfByVnfmIdIsEmpty() throws ServiceException { + public void testGetVnfByVnfmIdIsEmpty() throws IOException, ServiceException { final JSONObject restJson = new JSONObject(); MockUp proxyStub = new MockUp() {}; HttpServletRequest mockInstance = proxyStub.getMockInstance(); @@ -330,7 +330,7 @@ public class VnfRoaTest { } @Test - public void testGetVnfFail() throws ServiceException { + public void testGetVnfFail() throws IOException, ServiceException { final JSONObject restJson = new JSONObject(); restJson.put("retCode", Constant.REST_FAIL); MockUp proxyStub = new MockUp() {}; @@ -361,7 +361,7 @@ public class VnfRoaTest { } @Test - public void testGetVnf() throws ServiceException { + public void testGetVnf() throws IOException, ServiceException { final JSONObject restJson = new JSONObject(); restJson.put("retCode", Constant.REST_SUCCESS); MockUp proxyStub = new MockUp() {}; -- cgit 1.2.3-korg