From 1196463dbf4c6ef051dd7f68580fc7d77c5d054c Mon Sep 17 00:00:00 2001 From: Wojciech Sliwka Date: Fri, 1 Feb 2019 07:23:42 +0100 Subject: First part of Tests Issue-ID: VID-385 add first part of new tests for AAI, move some files to proper directory Change-Id: I6600c48d26387faf9e6cd6dbe7107e10428f4b52 Signed-off-by: Wojciech Sliwka --- .../org/onap/vid/aai/AaiOverTLSClientServerTest.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'vid-app-common/src/test/java/org/onap/vid/aai/AaiOverTLSClientServerTest.java') diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/AaiOverTLSClientServerTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/AaiOverTLSClientServerTest.java index fce9fa211..dd7b26c12 100644 --- a/vid-app-common/src/test/java/org/onap/vid/aai/AaiOverTLSClientServerTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/aai/AaiOverTLSClientServerTest.java @@ -28,20 +28,20 @@ import org.assertj.core.api.Assertions; import org.glassfish.grizzly.http.util.HttpStatus; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; import org.onap.vid.aai.model.ResourceType; import org.onap.vid.client.SyncRestClient; import org.onap.vid.model.SubscriberList; import org.onap.vid.testUtils.StubServerUtil; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; import java.io.IOException; -@RunWith(MockitoJUnitRunner.class) +import static org.mockito.MockitoAnnotations.initMocks; + public class AaiOverTLSClientServerTest { @Mock @@ -100,6 +100,11 @@ public class AaiOverTLSClientServerTest { serverUtil.stopServer(); } + @BeforeMethod + public void setUp(){ + initMocks(this); + } + @Test public void shouldSearchNodeTypeByName() throws IOException, ParseException { ObjectMapper objectMapper = getFasterXmlObjectMapper(); -- cgit 1.2.3-korg