summaryrefslogtreecommitdiffstats
path: root/auth/auth-batch/src
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-01-22 19:38:28 -0600
committerInstrumental <jonathan.gathman@att.com>2019-01-22 20:20:16 -0600
commitaf4d41b40866fababa7fe059d63ba73720fccbac (patch)
treee3e0d50e0218d722057cfaf55d7a3d9986df689e /auth/auth-batch/src
parentad389b325def6b35dc0331dac0899adceafced07 (diff)
Failing JUs
Issue-ID: AAF-709 Change-Id: Icbe68f143974034a050462101864e77ba9b5ce49 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-batch/src')
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/AbsCredBody.java3
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/reports/bodies/JU_AbsCredBodyTest.java (renamed from auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/reports/bodies/AbsCredBodyTest.java)20
2 files changed, 11 insertions, 12 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/AbsCredBody.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/AbsCredBody.java
index db45e206..6dd5bb25 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/AbsCredBody.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/AbsCredBody.java
@@ -22,7 +22,6 @@
*/
package org.onap.aaf.auth.batch.reports.bodies;
-import java.io.IOException;
import java.util.List;
public abstract class AbsCredBody extends NotifyBody {
@@ -33,7 +32,7 @@ public abstract class AbsCredBody extends NotifyBody {
@Override
public String user(List<String> row) {
- if( (row != null) && !row.isEmpty()) {
+ if( (row != null) && row.size()>1) {
return row.get(1);
}
return null;
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/reports/bodies/AbsCredBodyTest.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/reports/bodies/JU_AbsCredBodyTest.java
index b38344ac..e7d226b1 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/reports/bodies/AbsCredBodyTest.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/reports/bodies/JU_AbsCredBodyTest.java
@@ -22,35 +22,35 @@
package org.onap.aaf.auth.batch.reports.bodies;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
import org.junit.Assert;
import org.junit.Test;
import org.onap.aaf.auth.batch.reports.Notify;
import org.onap.aaf.auth.env.AuthzTrans;
-import java.util.Collections;
-import java.util.List;
-
-import static org.junit.Assert.*;
-
-public class AbsCredBodyTest {
+public class JU_AbsCredBodyTest {
@Test
public void testUserWithValue() {
- String testStr = "test";
- List<String> row = Collections.singletonList(testStr);
+ List<String> row = new ArrayList<>();
+ row.add("test");
+ row.add("user");
AbsCredBody absCredBody = new AbsCredBody("") {
@Override
public String body(AuthzTrans trans, Notify n, String id) {
return null;
}
};
- Assert.assertEquals(testStr, absCredBody.user(row));
+ Assert.assertEquals("user", absCredBody.user(row));
}
@Test
public void testUserWithoutValue() {
//String testStr = "test";
- List<String> row = Collections.EMPTY_LIST;
+ List<String> row = Collections.emptyList();
AbsCredBody absCredBody = new AbsCredBody("") {
@Override
public String body(AuthzTrans trans, Notify n, String id) {