summaryrefslogtreecommitdiffstats
path: root/auth/auth-cmd/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-cmd/src/test')
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/HMangrStub.java4
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java8
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Delete.java10
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Describe.java8
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Grant.java8
5 files changed, 21 insertions, 17 deletions
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/HMangrStub.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/HMangrStub.java
index 7ceb1233..c1b87540 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/HMangrStub.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/HMangrStub.java
@@ -49,6 +49,10 @@ public class HMangrStub extends HMangr {
return null;
}
@Override public<RET> RET oneOf(SecuritySetter<HttpURLConnection> ss, Retryable<RET> retryable, boolean notify, String host) {
+ try {
+ return retryable.code(clientMock);
+ } catch (Exception e) {
+ }
return null;
}
}
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java
index 1fb27470..41295c79 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java
@@ -60,7 +60,7 @@ public class JU_Create {
@Mock private Locator<URI> locMock;
@Mock private Writer wrtMock;
@Mock private Rcli<HttpURLConnection> clientMock;
- @Mock private Future<Object> futureMock;
+ @Mock private Future<String> futureMock;
private static Create create;
@@ -74,9 +74,9 @@ public class JU_Create {
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
MockitoAnnotations.initMocks(this);
- when(clientMock.create(any(), any(), any())).thenReturn(futureMock);
- when(clientMock.delete(any(), any(), any())).thenReturn(futureMock);
- when(clientMock.update(any(), any(), any())).thenReturn(futureMock);
+ when(clientMock.create(any(), any(), any(String.class))).thenReturn(futureMock);
+ when(clientMock.delete(any(), any(), any(String.class))).thenReturn(futureMock);
+ when(clientMock.update(any(), any(), any(String.class))).thenReturn(futureMock);
hman = new HMangrStub(access, locMock, clientMock);
access = new PropAccess(new PrintStream(new ByteArrayOutputStream()), new String[0]);
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Delete.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Delete.java
index 4fd7892a..19cacedb 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Delete.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Delete.java
@@ -24,7 +24,7 @@ package org.onap.aaf.auth.cmd.test.perm;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.when;
-
+import org.hamcrest.core.AnyOf;
import org.junit.Before;
import org.onap.aaf.auth.cmd.test.HMangrStub;
@@ -62,7 +62,7 @@ public class JU_Delete {
@Mock private Locator<URI> locMock;
@Mock private Writer wrtMock;
@Mock private Rcli<HttpURLConnection> clientMock;
- @Mock private Future<Object> futureMock;
+ @Mock private Future<String> futureMock;
private static Delete del;
@@ -75,9 +75,9 @@ public class JU_Delete {
public void setUp() throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
MockitoAnnotations.initMocks(this);
- when(clientMock.create(any(), any(), any())).thenReturn(futureMock);
- when(clientMock.delete(any(), any(), any())).thenReturn(futureMock);
- when(clientMock.update(any(), any(), any())).thenReturn(futureMock);
+ when(clientMock.create(any(), any(), any(String.class))).thenReturn(futureMock);
+ when(clientMock.delete(any(), any(), any(String.class))).thenReturn(futureMock);
+ when(clientMock.update(any(), any(), any(String.class))).thenReturn(futureMock);
hman = new HMangrStub(access, locMock, clientMock);
access = new PropAccess(new PrintStream(new ByteArrayOutputStream()), new String[0]);
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Describe.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Describe.java
index 224b5c75..9a5fc734 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Describe.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Describe.java
@@ -61,7 +61,7 @@ public class JU_Describe {
@Mock private Locator<URI> locMock;
@Mock private Writer wrtMock;
@Mock private Rcli<HttpURLConnection> clientMock;
- @Mock private Future<Object> futureMock;
+ @Mock private Future<String> futureMock;
private PropAccess access;
private HMangrStub hman;
@@ -74,9 +74,9 @@ public class JU_Describe {
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
MockitoAnnotations.initMocks(this);
- when(clientMock.create(any(), any(), any())).thenReturn(futureMock);
- when(clientMock.delete(any(), any(), any())).thenReturn(futureMock);
- when(clientMock.update(any(), any(), any())).thenReturn(futureMock);
+ when(clientMock.create(any(), any(), any(String.class))).thenReturn(futureMock);
+ when(clientMock.delete(any(), any(), any(String.class))).thenReturn(futureMock);
+ when(clientMock.update(any(), any(), any(String.class))).thenReturn(futureMock);
hman = new HMangrStub(access, locMock, clientMock);
access = new PropAccess(new PrintStream(new ByteArrayOutputStream()), new String[0]);
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Grant.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Grant.java
index 17280c64..975b83d2 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Grant.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Grant.java
@@ -63,7 +63,7 @@ public class JU_Grant {
@Mock private Locator<URI> locMock;
@Mock private Writer wrtMock;
@Mock private Rcli<HttpURLConnection> clientMock;
- @Mock private Future<Object> futureMock;
+ @Mock private Future<String> futureMock;
private PropAccess access;
private HMangrStub hman;
@@ -74,9 +74,9 @@ public class JU_Grant {
public void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
MockitoAnnotations.initMocks(this);
- when(clientMock.create(any(), any(), any())).thenReturn(futureMock);
- when(clientMock.delete(any(), any(), any())).thenReturn(futureMock);
- when(clientMock.update(any(), any(), any())).thenReturn(futureMock);
+ when(clientMock.create(any(), any(), any(String.class))).thenReturn(futureMock);
+ when(clientMock.delete(any(), any(), any(String.class))).thenReturn(futureMock);
+ when(clientMock.update(any(), any(), any(String.class))).thenReturn(futureMock);
hman = new HMangrStub(access, locMock, clientMock);
access = new PropAccess(new PrintStream(new ByteArrayOutputStream()), new String[0]);