netconf-console unit tests added
[netconf.git] / netconf / netconf-console / src / main / java / org / opendaylight / netconf / console / commands / NetconfDisconnectDeviceCommand.java
index efba6b62a3988773651a0be84e202be54150d932..b1abf2fa254d7a9f2bac9009245a99f1e0f48211 100644 (file)
@@ -8,6 +8,7 @@
 
 package org.opendaylight.netconf.console.commands;
 
+import com.google.common.annotations.VisibleForTesting;
 import org.apache.karaf.shell.commands.Command;
 import org.apache.karaf.shell.commands.Option;
 import org.apache.karaf.shell.console.AbstractAction;
@@ -24,12 +25,21 @@ public class NetconfDisconnectDeviceCommand extends AbstractAction {
         this.service = service;
     }
 
+    @VisibleForTesting
+    NetconfDisconnectDeviceCommand(final NetconfCommands service, final String deviceId, final String deviceIp,
+                                   final String devicePort) {
+        this.service = service;
+        this.deviceId = deviceId;
+        this.deviceIp = deviceIp;
+        this.devicePort = devicePort;
+    }
+
     @Option(name = "-i",
             aliases = { "--ipaddress" },
             description = "IP address of the netconf device",
             required = false,
             multiValued = false)
-    private String deviceIp = "";
+    private String deviceIp;
 
     @Option(name = "-p",
             aliases = { "--port" },
@@ -43,7 +53,7 @@ public class NetconfDisconnectDeviceCommand extends AbstractAction {
             description = "Node Identifier of the netconf device",
             required = false,
             multiValued = false)
-    private String deviceId = "";
+    private String deviceId;
 
     @Override
     protected Object doExecute() throws Exception {