aboutsummaryrefslogtreecommitdiffstats
path: root/aai-service/provider/src/test/java
diff options
context:
space:
mode:
authorRich Tabedzki <richard.tabedzki@att.com>2017-12-18 19:47:17 +0000
committerRich Tabedzki <richard.tabedzki@att.com>2017-12-18 19:48:23 +0000
commitc2f80d2048346ceab1eb09249665f7d82a875c2d (patch)
treec1c62cd523fae7459100f26914d32c203053e85e /aai-service/provider/src/test/java
parent890ad9dd6632cc2c2a125645afeee4724b3598be (diff)
Isolate deprecated code in CCSDK aai-service
Changes made: * removed deprecated methods no longer used in AAI Service feature. * Externalize inner class AAIExecutor as AAIClientRESTExecutor to improve clarity and modularity of code. Change-Id: Ifd68fb931fbf03e451462993b760a7c29e8a8e2d Issue-ID: CCSDK-137 Signed-off-by: Rich Tabedzki <richard.tabedzki@att.com>
Diffstat (limited to 'aai-service/provider/src/test/java')
-rwxr-xr-xaai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/EchoRequestTest.java5
-rwxr-xr-xaai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequestTest.java38
-rwxr-xr-xaai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java30
3 files changed, 37 insertions, 36 deletions
diff --git a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/EchoRequestTest.java b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/EchoRequestTest.java
index 9d1f6a53..327e4c65 100755
--- a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/EchoRequestTest.java
+++ b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/EchoRequestTest.java
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertNotNull;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
+import java.net.URISyntaxException;
import java.net.URL;
import org.junit.AfterClass;
@@ -66,9 +67,9 @@ public class EchoRequestTest {
try {
url = request.getRequestUrl("GET", null);
assertNotNull(url);
- } catch (UnsupportedEncodingException | MalformedURLException exc) {
+ } catch (UnsupportedEncodingException | MalformedURLException | URISyntaxException exc) {
LOG.error("Failed test", exc);
- }
+ }
}
diff --git a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequestTest.java b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequestTest.java
index 5f9fc7f8..eb84cfdf 100755
--- a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequestTest.java
+++ b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequestTest.java
@@ -27,6 +27,7 @@ import static org.junit.Assert.fail;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
+import java.net.URISyntaxException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
@@ -37,7 +38,6 @@ import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum;
-import org.openecomp.aai.inventory.v11.GenericVnf;
import org.openecomp.aai.inventory.v11.LInterface;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -116,23 +116,23 @@ public class GenericRequestTest {
}
}
- @Test
- public void test003() {
- LOG.info("----------------------- Test: " + new Object(){}.getClass().getEnclosingMethod().getName() + " -----------------------");
- try
- {
- String vnf_id = "4718302b-7884-4959-a499-f470c62418ff";
-
- GenericVnf genericVnf = client.requestGenericVnfData(vnf_id);
-
- client.deleteGenericVnfData(vnf_id, genericVnf.getResourceVersion());
-
- }
- catch (Throwable e)
- {
- LOG.error("Caught exception", e);
- }
- }
+// @Test
+// public void test003() {
+// LOG.info("----------------------- Test: " + new Object(){}.getClass().getEnclosingMethod().getName() + " -----------------------");
+// try
+// {
+// String vnf_id = "4718302b-7884-4959-a499-f470c62418ff";
+//
+// GenericVnf genericVnf = client.requestGenericVnfData(vnf_id);
+//
+// client.deleteGenericVnfData(vnf_id, genericVnf.getResourceVersion());
+//
+// }
+// catch (Throwable e)
+// {
+// LOG.error("Caught exception", e);
+// }
+// }
@Test
@@ -143,7 +143,7 @@ public class GenericRequestTest {
try {
url = request.getRequestUrl("GET", null);
assertNotNull(url);
- } catch (UnsupportedEncodingException | MalformedURLException exc) {
+ } catch (UnsupportedEncodingException | MalformedURLException | URISyntaxException exc) {
LOG.error("Failed test", exc);
}
diff --git a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java
index 4563adfc..0e81e5b5 100755
--- a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java
+++ b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java
@@ -75,21 +75,21 @@ public class RegressionTest {
LOG.info("----------------------- AAIResourceTest.tearDown -----------------------");
}
- @Test
- public void R1510Test05GenericVnfDataRequestDelete() {
- LOG.info("----------------------- Test: " + new Object(){}.getClass().getEnclosingMethod().getName() + " -----------------------");
- try
- {
- String vnf_id = "bpsx0001v-7071";
- boolean response = client.deleteGenericVnfData(vnf_id, null);
- assertTrue(response);
-
- }
- catch (Throwable e)
- {
- assert(true);
- }
- }
+// @Test
+// public void R1510Test05GenericVnfDataRequestDelete() {
+// LOG.info("----------------------- Test: " + new Object(){}.getClass().getEnclosingMethod().getName() + " -----------------------");
+// try
+// {
+// String vnf_id = "bpsx0001v-7071";
+// boolean response = client.deleteGenericVnfData(vnf_id, null);
+// assertTrue(response);
+//
+// }
+// catch (Throwable e)
+// {
+// assert(true);
+// }
+// }
@Test
public void R1604TestWanConnectorSave01Request()