aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test/java/org/onap/vid/integrationTest/AaiIntegrationTest.java
diff options
context:
space:
mode:
authorOfir Sonsino <os0695@att.com>2018-01-31 17:19:00 +0200
committerOfir Sonsino <os0695@att.com>2018-01-31 17:19:00 +0200
commit1cfb08779ea0e00be69e072a940b3063e049fe6b (patch)
tree6602a900387c8393ed0dcd81c0539381632903c6 /vid-app-common/src/test/java/org/onap/vid/integrationTest/AaiIntegrationTest.java
parent2f20b001b9243e0f8b44aecc768ec265fd538732 (diff)
org.onap migration
Change-Id: I52f0b2851f2c765752b6d21f49b32136d7d72a3d Issue-ID: VID-86 Signed-off-by: Ofir Sonsino <os0695@att.com>
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/integrationTest/AaiIntegrationTest.java')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/integrationTest/AaiIntegrationTest.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/integrationTest/AaiIntegrationTest.java b/vid-app-common/src/test/java/org/onap/vid/integrationTest/AaiIntegrationTest.java
new file mode 100644
index 000000000..eaad6ccc6
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/integrationTest/AaiIntegrationTest.java
@@ -0,0 +1,43 @@
+package org.onap.vid.integrationTest;
+
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.vid.aai.AaiClient;
+import org.onap.vid.aai.AaiClientInterface;
+import org.onap.vid.aai.AaiResponse;
+import org.onap.vid.aai.model.GetServiceModelsByDistributionStatusResponse;
+import org.onap.vid.aai.model.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.mock.web.MockServletContext;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+
+@ContextConfiguration(classes = {SystemProperties.class})
+
+
+@WebAppConfiguration
+public class AaiIntegrationTest extends AbstractTestNGSpringContextTests {
+
+
+ @Autowired
+ MockServletContext servletContext;
+
+
+ @Test
+ public void testGetServiceModelsFromAai() throws Exception {
+ AaiClientInterface aaiClient = new AaiClient(servletContext);
+ AaiResponse<GetServiceModelsByDistributionStatusResponse> serviceModelsByDistributionStatusResponse = aaiClient.getServiceModelsByDistributionStatus();
+ GetServiceModelsByDistributionStatusResponse response = serviceModelsByDistributionStatusResponse.getT();
+ for(Result result: response.getResults()){
+ Assert.assertNotNull(result.getModel().getModelInvariantId());
+ Assert.assertNotNull(result.getModel().getModelVers().getModelVer().get(0).getModelVersionId());
+ Assert.assertNotNull(result.getModel().getModelVers().getModelVer().get(0).getModelName());
+ Assert.assertNotNull(result.getModel().getModelVers().getModelVer().get(0).getModelVersion());
+ }
+ }
+
+
+}