aboutsummaryrefslogtreecommitdiffstats
path: root/appc-adapters
diff options
context:
space:
mode:
authorGanesh Chandrasekaran <ganesh.c@samsung.com>2018-09-05 09:41:21 +0900
committerGanesh Chandrasekaran <ganesh.c@samsung.com>2018-09-11 00:51:23 +0000
commit6803143f3ab9b24b212de4cacf16bb739450f1b6 (patch)
treed37f7794be5ab461bd0c6764061127648fafc0eb /appc-adapters
parent0750d459edaaf242190ddc87ead3c3207f2edb55 (diff)
Test cases configure and disconnect JschClient
Issue-ID: APPC-1182 Change-Id: I49db6487f48a214ccd061be323fde09546bbd228 Signed-off-by: Ganesh Chandrasekaran <ganesh.c@samsung.com>
Diffstat (limited to 'appc-adapters')
-rw-r--r--appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/test/java/org/onap/appc/adapter/netconf/jsch/TestNetconfClientJsch.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/test/java/org/onap/appc/adapter/netconf/jsch/TestNetconfClientJsch.java b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/test/java/org/onap/appc/adapter/netconf/jsch/TestNetconfClientJsch.java
index 2caf5d421..fb44763df 100644
--- a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/test/java/org/onap/appc/adapter/netconf/jsch/TestNetconfClientJsch.java
+++ b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/test/java/org/onap/appc/adapter/netconf/jsch/TestNetconfClientJsch.java
@@ -21,14 +21,17 @@
package org.onap.appc.adapter.netconf.jsch;
+import com.jcraft.jsch.Session;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import org.onap.appc.adapter.netconf.ConnectionDetails;
import org.onap.appc.adapter.netconf.NetconfConnectionDetails;
import org.onap.appc.adapter.netconf.internal.NetconfAdapter;
import org.onap.appc.exceptions.APPCException;
import java.io.IOException;
+import java.util.Properties;
public class TestNetconfClientJsch {
@@ -46,6 +49,9 @@ public class TestNetconfClientJsch {
connectionDetails.setPort(8080);
connectionDetails.setUsername("test");
connectionDetails.setPassword("test");
+ Properties additionalProperties = new Properties();
+ additionalProperties.setProperty("testKey1", "testParam1");
+ connectionDetails.setAdditionalProperties(additionalProperties);
netconfClientJsch.connect(connectionDetails);
}
@@ -77,4 +83,16 @@ public class TestNetconfClientJsch {
netconfClientJsch.configure(message);
}
+
+ @Test (expected = NullPointerException.class)
+ public void testGetConfigure() throws APPCException, IOException {
+
+ netconfClientJsch.getConfiguration();
+ }
+
+ @Test
+ public void testDisconnect() throws APPCException, IOException {
+
+ netconfClientJsch.disconnect();
+ }
}