aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/test/java/org/onap
diff options
context:
space:
mode:
authorBharath Thiruveedula <bharath_ves@hotmail.com>2017-08-07 08:28:13 +0530
committerBharath Thiruveedula <bharath_ves@hotmail.com>2017-08-26 00:02:33 +0530
commita7a64477c28b433ba05afbe65155450d6ae3cba8 (patch)
tree103e4301b0831fe81193b65971ed66ebbd56828d /framework/src/test/java/org/onap
parent42ad121a52d01dd203c529f2ba7753f82d45ec21 (diff)
Add VSP lifecycle commands
Change-Id: Ibdc78b3ab1921c160f8ee193fcd47be0c75f94a9 Issue-ID: CLI-16 Signed-off-by: Bharath T<bharath.thiruveedula@verizon.com>
Diffstat (limited to 'framework/src/test/java/org/onap')
-rw-r--r--framework/src/test/java/org/onap/cli/fw/ad/OnapAuthClientTest.java22
1 files changed, 17 insertions, 5 deletions
diff --git a/framework/src/test/java/org/onap/cli/fw/ad/OnapAuthClientTest.java b/framework/src/test/java/org/onap/cli/fw/ad/OnapAuthClientTest.java
index f98846c6..c57be7d2 100644
--- a/framework/src/test/java/org/onap/cli/fw/ad/OnapAuthClientTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/ad/OnapAuthClientTest.java
@@ -16,6 +16,9 @@
package org.onap.cli.fw.ad;
+import java.util.ArrayList;
+import java.util.List;
+
import static org.junit.Assert.assertEquals;
import org.junit.AfterClass;
@@ -30,6 +33,7 @@ import org.onap.cli.fw.error.OnapCommandServiceNotFound;
import org.onap.cli.fw.http.HttpInput;
import org.onap.cli.fw.http.HttpResult;
import org.onap.cli.fw.http.OnapHttpConnection;
+import org.onap.cli.fw.input.OnapCommandParameter;
import mockit.Invocation;
import mockit.Mock;
@@ -40,15 +44,19 @@ public class OnapAuthClientTest {
OnapAuthClient client;
@Before
- public void setUp() throws OnapCommandHttpFailure {
+ public void setUp() throws OnapCommandHttpFailure, OnapCommandException {
OnapCredentials creds = new OnapCredentials("test", "test123", "http://192.168.99.10:80");
- client = new OnapAuthClient(creds, true);
+ OnapService service = new OnapService();
+ List<OnapCommandParameter> params = new ArrayList<>();
+ client = new OnapAuthClient(creds, true, service, params);
}
@Test
public void loginFailedAuthIgnoredTest() throws OnapCommandException {
OnapCredentials creds = new OnapCredentials("test", "test123", "http://192.168.99.10:80");
- OnapAuthClient client = new OnapAuthClient(creds, true);
+ OnapService service = new OnapService();
+ List<OnapCommandParameter> params = new ArrayList<>();
+ OnapAuthClient client = new OnapAuthClient(creds, true, service, params);
if (OnapCommandConfg.isAuthIgnored()) {
client.getDebugInfo();
client.login();
@@ -58,7 +66,9 @@ public class OnapAuthClientTest {
@Test
public void logoutFailedAuthIgnoredTest() throws OnapCommandException {
OnapCredentials creds = new OnapCredentials("test", "test123", "http://192.168.99.10:80");
- OnapAuthClient client = new OnapAuthClient(creds, true);
+ OnapService service = new OnapService();
+ List<OnapCommandParameter> params = new ArrayList<>();
+ OnapAuthClient client = new OnapAuthClient(creds, true, service, params);
if (OnapCommandConfg.isAuthIgnored()) {
client.logout();
}
@@ -67,7 +77,9 @@ public class OnapAuthClientTest {
@Test
public void getMsbUrlTest() throws OnapCommandException {
OnapCredentials creds = new OnapCredentials("test", "test123", "http://192.168.99.10:80");
- OnapAuthClient client = new OnapAuthClient(creds, true);
+ OnapService service = new OnapService();
+ List<OnapCommandParameter> params = new ArrayList<>();
+ OnapAuthClient client = new OnapAuthClient(creds, true, service, params);
OnapService srv = new OnapService();
srv.setName("msb");
String msb = client.getServiceBasePath(srv);