summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dt5972@att.com>2018-03-27 19:38:27 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-27 19:38:27 +0000
commite290ebd8696ea897d20cf0234c33e9104fca3853 (patch)
tree166776bdff70492bfcbe78285523ebd25d74bf95
parent2d2c5f44cf489baa2a0c27af6b773bacf64faf17 (diff)
parent7dee0c8d2680888271da556fedc7ea0d0bc773f9 (diff)
Merge "SdncOdlConnection coverage"
-rw-r--r--dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncOdlConnection.java26
-rw-r--r--ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncOdlConnection.java45
2 files changed, 71 insertions, 0 deletions
diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncOdlConnection.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncOdlConnection.java
new file mode 100644
index 000000000..db24a4545
--- /dev/null
+++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncOdlConnection.java
@@ -0,0 +1,26 @@
+package org.onap.ccsdk.sli.northbound.dmaapclient;
+
+import org.junit.Test;
+
+import java.io.IOException;
+import java.net.ConnectException;
+
+public class TestSdncOdlConnection {
+
+ @Test
+ public void test() {
+
+ try {
+ SdncOdlConnection sdncOdlConnection = SdncOdlConnection.newInstance("https://127.0.0.1:8447/aai/v11/network/pnfs/pnf/a8098c1a-f86e-11da-bd1a-00112444be1e", "", "");
+ sdncOdlConnection.send("PUT", "application/json", "{\n" +
+ " \"input\" : { \n" +
+ " }\n" +
+ "}");
+ } catch (ConnectException e) {
+ //Connection exception
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+}
diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncOdlConnection.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncOdlConnection.java
new file mode 100644
index 000000000..1fac0c299
--- /dev/null
+++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncOdlConnection.java
@@ -0,0 +1,45 @@
+package org.onap.ccsdk.sli.northbound.uebclient;
+
+import ch.vorburger.mariadb4j.DB;
+import ch.vorburger.mariadb4j.DBConfigurationBuilder;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.ccsdk.sli.core.dblib.DBResourceManager;
+import org.openecomp.sdc.api.IDistributionClient;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.ConnectException;
+import java.net.URL;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+import java.util.Properties;
+
+import static org.mockito.Mockito.mock;
+
+public class TestSdncOdlConnection {
+
+ @Test
+ public void test() {
+
+ try {
+ SdncOdlConnection sdncOdlConnection = SdncOdlConnection.newInstance("https://127.0.0.1:8447/aai/v11/network/pnfs/pnf/a8098c1a-f86e-11da-bd1a-00112444be1e", "", "");
+ sdncOdlConnection.send("PUT", "application/json", "{\n" +
+ " \"input\" : { \n" +
+ " }\n" +
+ "}");
+ } catch (ConnectException e) {
+ //Connection exception
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+}