summaryrefslogtreecommitdiffstats
path: root/auth/auth-batch/src/test
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-09-07 12:21:34 -0500
committerInstrumental <jonathan.gathman@att.com>2018-09-07 12:22:50 -0500
commit4b5a7d721d994a49057e9bfb403c7bff1b376660 (patch)
treea36d03227b63a3e60346d6c3ca87b061087dae85 /auth/auth-batch/src/test
parent824dc7b5fc0e1ccdf7f460479aff344727f0f01e (diff)
Mass removal of all Tabs (Style Warnings)
Issue-ID: AAF-473 Change-Id: Iaf0ef8120882937959bb0065f2f6ba74a021940f Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-batch/src/test')
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_ActionDAO.java78
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_Email.java198
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_EmailPrint.java88
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_Message.java48
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Approval.java220
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Approver.java50
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_CacheChange.java72
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Creator.java54
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Cred.java174
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Future.java128
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_History.java52
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_InputIterator.java56
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_MiscID.java106
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_MonthData.java116
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_NS.java76
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_NsAttrib.java24
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Perm.java108
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Role.java98
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_UserRole.java198
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_Batch.java76
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchException.java40
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchPrincipal.java16
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_CassBatch.java44
23 files changed, 1060 insertions, 1060 deletions
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_ActionDAO.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_ActionDAO.java
index 80ce0ca4..254a6adf 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_ActionDAO.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_ActionDAO.java
@@ -47,49 +47,49 @@ import java.util.List;
import org.junit.Test;
public class JU_ActionDAO {
-
- AuthzTrans aTrans;
- Cluster cluster;
- ActionDAOStub actionDAOStub;
- ActionDAOStub actionDAOStub1;
+
+ AuthzTrans aTrans;
+ Cluster cluster;
+ ActionDAOStub actionDAOStub;
+ ActionDAOStub actionDAOStub1;
- private class ActionDAOStub extends ActionDAO {
+ private class ActionDAOStub extends ActionDAO {
- public ActionDAOStub(AuthzTrans trans, ActionDAO predecessor) {
- super(trans, predecessor);
- // TODO Auto-generated constructor stub
- }
+ public ActionDAOStub(AuthzTrans trans, ActionDAO predecessor) {
+ super(trans, predecessor);
+ // TODO Auto-generated constructor stub
+ }
- public ActionDAOStub(AuthzTrans trans, Cluster cluster, boolean dryRun) throws APIException, IOException {
- super(trans, cluster, dryRun);
- // TODO Auto-generated constructor stub
- }
+ public ActionDAOStub(AuthzTrans trans, Cluster cluster, boolean dryRun) throws APIException, IOException {
+ super(trans, cluster, dryRun);
+ // TODO Auto-generated constructor stub
+ }
- @Override
- public Result exec(AuthzTrans trans, Object data, Object t) {
- // TODO Auto-generated method stub
- return null;
- }
-
- }
-
- @Before
- public void setUp() throws APIException, IOException {
-// Cluster.Initializer cInit = mock(Cluster.Initializer.class);
-// Cluster.Builder cBuild = new Cluster.Builder();
-// cBuild.addContactPoint("test");
-// cBuild.build();
-// cluster.buildFrom(cBuild);
-// cluster.builder();
-// cluster.init();
-// cluster.builder().getContactPoints();
-
+ @Override
+ public Result exec(AuthzTrans trans, Object data, Object t) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ }
+
+ @Before
+ public void setUp() throws APIException, IOException {
+// Cluster.Initializer cInit = mock(Cluster.Initializer.class);
+// Cluster.Builder cBuild = new Cluster.Builder();
+// cBuild.addContactPoint("test");
+// cBuild.build();
+// cluster.buildFrom(cBuild);
+// cluster.builder();
+// cluster.init();
+// cluster.builder().getContactPoints();
+
-
-// aTrans = mock(AuthzTrans.class);
-// cluster = mock(Cluster.class);
-// actionDAOStub = new ActionDAOStub(aTrans,cluster,true);
-// actionDAOStub1 = new ActionDAOStub(aTrans, actionDAOStub);
- }
+
+// aTrans = mock(AuthzTrans.class);
+// cluster = mock(Cluster.class);
+// actionDAOStub = new ActionDAOStub(aTrans,cluster,true);
+// actionDAOStub1 = new ActionDAOStub(aTrans, actionDAOStub);
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_Email.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_Email.java
index 70cd08a8..d3d4719e 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_Email.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_Email.java
@@ -47,105 +47,105 @@ import java.util.Set;
import org.junit.Test;
public class JU_Email {
-
- private ByteArrayOutputStream outStream;
- private ByteArrayOutputStream errStream;
- Email email;
- Identity usersI;
- Message msg;
- PrintStream ps;
-
- @Before
- public void setUp() throws FileNotFoundException {
- outStream = new ByteArrayOutputStream();
- errStream = new ByteArrayOutputStream();
- ps = new PrintStream(errStream);
- System.setOut(new PrintStream(outStream));
- System.setErr(ps);
-
- usersI = mock(Identity.class);
- msg = new Message();
- email = new Email();
- }
+
+ private ByteArrayOutputStream outStream;
+ private ByteArrayOutputStream errStream;
+ Email email;
+ Identity usersI;
+ Message msg;
+ PrintStream ps;
+
+ @Before
+ public void setUp() throws FileNotFoundException {
+ outStream = new ByteArrayOutputStream();
+ errStream = new ByteArrayOutputStream();
+ ps = new PrintStream(errStream);
+ System.setOut(new PrintStream(outStream));
+ System.setErr(ps);
+
+ usersI = mock(Identity.class);
+ msg = new Message();
+ email = new Email();
+ }
- @Test
- public void testClear() {
- Assert.assertNotNull(email.clear());
- }
-
- @Test
- public void testIndent() {
- email.indent("indent");
- }
-
- @Test
- public void testPreamble() {
- email.preamble("format");
- }
-
- @Test
- public void testAddTo() {
- email.addTo(usersI);
-
-// Collection col = mock(Collection.class);
-// col.add("test");
-// email.addTo(col);
-
- email.addTo("email");
- }
-
- @Test
- public void testAddCC() {
- email.addCC(usersI);
- email.addCC("email");
- }
-
-// @Test
-// public void testAdd() throws OrganizationException {
-// email.add(usersI, true);
-// }
-
- @Test
- public void testSubject() {
- email.subject("format");
- email.subject("for%smat","format");
- }
-
- @Test
- public void testSignature() {
- email.signature("format","arg");
- }
-
- @Test
- public void testMsg() {
- email.msg(msg);
- }
-
- @Test
- public void testExec() {
- AuthzTrans trans = mock(AuthzTrans.class);
- Organization org = mock(Organization.class);
- email.preamble("format");
- email.msg(msg);
- email.signature("format","arg");
-
- email.exec(trans, org, "text");
- }
-
- @Test
- public void testLog() throws FileNotFoundException {
- email.addTo("email");
- email.addCC("email");
- email.log(ps, "email");
- email.addTo("emails");
- email.addCC("emails");
- email.log(ps, "emails");
- }
-
- @After
- public void cleanUp() {
- System.setErr(System.err);
- System.setOut(System.out);
- }
+ @Test
+ public void testClear() {
+ Assert.assertNotNull(email.clear());
+ }
+
+ @Test
+ public void testIndent() {
+ email.indent("indent");
+ }
+
+ @Test
+ public void testPreamble() {
+ email.preamble("format");
+ }
+
+ @Test
+ public void testAddTo() {
+ email.addTo(usersI);
+
+// Collection col = mock(Collection.class);
+// col.add("test");
+// email.addTo(col);
+
+ email.addTo("email");
+ }
+
+ @Test
+ public void testAddCC() {
+ email.addCC(usersI);
+ email.addCC("email");
+ }
+
+// @Test
+// public void testAdd() throws OrganizationException {
+// email.add(usersI, true);
+// }
+
+ @Test
+ public void testSubject() {
+ email.subject("format");
+ email.subject("for%smat","format");
+ }
+
+ @Test
+ public void testSignature() {
+ email.signature("format","arg");
+ }
+
+ @Test
+ public void testMsg() {
+ email.msg(msg);
+ }
+
+ @Test
+ public void testExec() {
+ AuthzTrans trans = mock(AuthzTrans.class);
+ Organization org = mock(Organization.class);
+ email.preamble("format");
+ email.msg(msg);
+ email.signature("format","arg");
+
+ email.exec(trans, org, "text");
+ }
+
+ @Test
+ public void testLog() throws FileNotFoundException {
+ email.addTo("email");
+ email.addCC("email");
+ email.log(ps, "email");
+ email.addTo("emails");
+ email.addCC("emails");
+ email.log(ps, "emails");
+ }
+
+ @After
+ public void cleanUp() {
+ System.setErr(System.err);
+ System.setOut(System.out);
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_EmailPrint.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_EmailPrint.java
index fb5d2bd5..fe87219b 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_EmailPrint.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_EmailPrint.java
@@ -43,50 +43,50 @@ import java.lang.reflect.Method;
import org.junit.Test;
public class JU_EmailPrint {
-
- private ByteArrayOutputStream outStream;
- private ByteArrayOutputStream errStream;
- EmailPrint ePrint;
- AuthzTrans trans;
- Organization org;
- StringBuilder strBuilder;
-
- @Before
- public void setUp() {
- outStream = new ByteArrayOutputStream();
- errStream = new ByteArrayOutputStream();
- System.setOut(new PrintStream(outStream));
- System.setErr(new PrintStream(errStream));
- ePrint = new EmailPrint();
- trans = mock(AuthzTrans.class);
- org = mock(Organization.class);
- strBuilder = new StringBuilder();
- strBuilder.append("test\nte\nst");
- ePrint.addTo("test");
- ePrint.addTo("test1");
- ePrint.addTo("test2");
- ePrint.addCC("test");
- ePrint.addCC("test1");
- ePrint.addCC("test2");
-
- }
+
+ private ByteArrayOutputStream outStream;
+ private ByteArrayOutputStream errStream;
+ EmailPrint ePrint;
+ AuthzTrans trans;
+ Organization org;
+ StringBuilder strBuilder;
+
+ @Before
+ public void setUp() {
+ outStream = new ByteArrayOutputStream();
+ errStream = new ByteArrayOutputStream();
+ System.setOut(new PrintStream(outStream));
+ System.setErr(new PrintStream(errStream));
+ ePrint = new EmailPrint();
+ trans = mock(AuthzTrans.class);
+ org = mock(Organization.class);
+ strBuilder = new StringBuilder();
+ strBuilder.append("test\nte\nst");
+ ePrint.addTo("test");
+ ePrint.addTo("test1");
+ ePrint.addTo("test2");
+ ePrint.addCC("test");
+ ePrint.addCC("test1");
+ ePrint.addCC("test2");
+
+ }
- @Test
- public void testExec() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
- Class c = ePrint.getClass();
- Class[] cArg = new Class[3];
- cArg[0] = AuthzTrans.class;
- cArg[1] = Organization.class;
- cArg[2] = StringBuilder.class;//Steps to test a protected method
- Method execMethod = c.getDeclaredMethod("exec", cArg);
- execMethod.setAccessible(true);
- execMethod.invoke(ePrint, trans, org, strBuilder);
- }
-
- @After
- public void cleanUp() {
- System.setErr(System.err);
- System.setOut(System.out);
- }
+ @Test
+ public void testExec() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ Class c = ePrint.getClass();
+ Class[] cArg = new Class[3];
+ cArg[0] = AuthzTrans.class;
+ cArg[1] = Organization.class;
+ cArg[2] = StringBuilder.class;//Steps to test a protected method
+ Method execMethod = c.getDeclaredMethod("exec", cArg);
+ execMethod.setAccessible(true);
+ execMethod.invoke(ePrint, trans, org, strBuilder);
+ }
+
+ @After
+ public void cleanUp() {
+ System.setErr(System.err);
+ System.setOut(System.out);
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_Message.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_Message.java
index fa7409ea..ada1dbae 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_Message.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/actions/test/JU_Message.java
@@ -33,30 +33,30 @@ import static org.mockito.Mockito.*;
import org.junit.Test;
public class JU_Message {
-
- Message msg;
-
- @Before
- public void setUp() {
- msg = new Message();
- }
+
+ Message msg;
+
+ @Before
+ public void setUp() {
+ msg = new Message();
+ }
- @Test
- public void testLine() {
- msg.line("test");
- }
-
- @Test
- public void testClear() {
- msg.clear();
- }
-
- @Test
- public void testMsg() {
- StringBuilder sb = new StringBuilder();
- msg.line("test");
- msg.line("test1");
- msg.msg(sb, "indent");
- }
+ @Test
+ public void testLine() {
+ msg.line("test");
+ }
+
+ @Test
+ public void testClear() {
+ msg.clear();
+ }
+
+ @Test
+ public void testMsg() {
+ StringBuilder sb = new StringBuilder();
+ msg.line("test");
+ msg.line("test1");
+ msg.msg(sb, "indent");
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Approval.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Approval.java
index a0ade9ea..288e929b 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Approval.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Approval.java
@@ -42,116 +42,116 @@ import java.util.UUID;
import org.junit.Test;
public class JU_Approval {
-
- Approval approval;
- UUID id;
- UUID ticket;
- Date date;
-
- @Before
- public void setUp() {
- id = new UUID(0, 0);
- ticket = new UUID(0, 0);
- date = new Date();
-
- approval = new Approval(id, ticket, "approver", date,
- "user", "memo", "operation", "status", "type", 100l);
- }
+
+ Approval approval;
+ UUID id;
+ UUID ticket;
+ Date date;
+
+ @Before
+ public void setUp() {
+ id = new UUID(0, 0);
+ ticket = new UUID(0, 0);
+ date = new Date();
+
+ approval = new Approval(id, ticket, "approver", date,
+ "user", "memo", "operation", "status", "type", 100l);
+ }
- @Test
- public void testRoleFromMemo() {
- Assert.assertNull(approval.roleFromMemo(null));
- Assert.assertEquals(".admin", approval.roleFromMemo("Re-Validate as Administrator for AAF Namespace '\'test\'test"));
- Assert.assertEquals(".owner", approval.roleFromMemo("Re-Validate Ownership for AAF Namespace '\'test\'test"));
- Assert.assertEquals("", approval.roleFromMemo("Re-Approval in Role '\'test\'test"));
- }
-
- @Test
- public void testExpunge() {
- approval.expunge();
- }
-
- @Test
- public void testGetLast_notified() {
- Assert.assertTrue(approval.getLast_notified()instanceof Date);
- }
-
- @Test
- public void testSetLastNotified() {
- approval.setLastNotified(date);
- }
-
- @Test
- public void testGetStatus() {
- Assert.assertEquals("status", approval.getStatus());
- }
-
- @Test
- public void testSetStatus() {
- approval.setStatus("status");
- }
-
- @Test
- public void testGetId() {
- Assert.assertTrue(approval.getId() instanceof UUID);
- }
-
- @Test
- public void testGetTicket() {
- Assert.assertTrue(approval.getTicket() instanceof UUID);
- }
-
- @Test
- public void testGetMemo() {
- Assert.assertEquals("memo", approval.getMemo());
- }
-
- @Test
- public void testGetOperation() {
- Assert.assertEquals("operation", approval.getOperation());
- }
-
- @Test
- public void testGetType() {
- Assert.assertEquals("type", approval.getType());
- }
-
- @Test
- public void testLapsed() {
- approval.lapsed();
- }
-
- @Test
- public void testGetRole() {
- Assert.assertNull(approval.getRole());
- }
-
- @Test
- public void testToString() {
- Assert.assertEquals("user memo", approval.toString());
- }
-
- @Test
- public void testResetLocalData() {
- approval.resetLocalData();
- }
-
- @Test
- public void testSizeForDeletion() {
- Assert.assertEquals(0, approval.sizeForDeletion());
- }
-
- @Test
- public void testPendingDelete() {
- Assert.assertFalse(approval.pendingDelete(approval));
- }
-
- @Test
- public void testDelayDelete() {
- AuthzTrans trans = mock(AuthzTrans.class);
- ApprovalDAO dao = mock(ApprovalDAO.class);
- List<Approval> list = null;
- approval.delayDelete(trans, dao, true, list, "text");
- }
+ @Test
+ public void testRoleFromMemo() {
+ Assert.assertNull(approval.roleFromMemo(null));
+ Assert.assertEquals(".admin", approval.roleFromMemo("Re-Validate as Administrator for AAF Namespace '\'test\'test"));
+ Assert.assertEquals(".owner", approval.roleFromMemo("Re-Validate Ownership for AAF Namespace '\'test\'test"));
+ Assert.assertEquals("", approval.roleFromMemo("Re-Approval in Role '\'test\'test"));
+ }
+
+ @Test
+ public void testExpunge() {
+ approval.expunge();
+ }
+
+ @Test
+ public void testGetLast_notified() {
+ Assert.assertTrue(approval.getLast_notified()instanceof Date);
+ }
+
+ @Test
+ public void testSetLastNotified() {
+ approval.setLastNotified(date);
+ }
+
+ @Test
+ public void testGetStatus() {
+ Assert.assertEquals("status", approval.getStatus());
+ }
+
+ @Test
+ public void testSetStatus() {
+ approval.setStatus("status");
+ }
+
+ @Test
+ public void testGetId() {
+ Assert.assertTrue(approval.getId() instanceof UUID);
+ }
+
+ @Test
+ public void testGetTicket() {
+ Assert.assertTrue(approval.getTicket() instanceof UUID);
+ }
+
+ @Test
+ public void testGetMemo() {
+ Assert.assertEquals("memo", approval.getMemo());
+ }
+
+ @Test
+ public void testGetOperation() {
+ Assert.assertEquals("operation", approval.getOperation());
+ }
+
+ @Test
+ public void testGetType() {
+ Assert.assertEquals("type", approval.getType());
+ }
+
+ @Test
+ public void testLapsed() {
+ approval.lapsed();
+ }
+
+ @Test
+ public void testGetRole() {
+ Assert.assertNull(approval.getRole());
+ }
+
+ @Test
+ public void testToString() {
+ Assert.assertEquals("user memo", approval.toString());
+ }
+
+ @Test
+ public void testResetLocalData() {
+ approval.resetLocalData();
+ }
+
+ @Test
+ public void testSizeForDeletion() {
+ Assert.assertEquals(0, approval.sizeForDeletion());
+ }
+
+ @Test
+ public void testPendingDelete() {
+ Assert.assertFalse(approval.pendingDelete(approval));
+ }
+
+ @Test
+ public void testDelayDelete() {
+ AuthzTrans trans = mock(AuthzTrans.class);
+ ApprovalDAO dao = mock(ApprovalDAO.class);
+ List<Approval> list = null;
+ approval.delayDelete(trans, dao, true, list, "text");
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Approver.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Approver.java
index 37882527..b4ae1213 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Approver.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Approver.java
@@ -36,30 +36,30 @@ import org.junit.Test;
public class JU_Approver {
- Approver approver;
- Organization org;
- Message msg;
-
- @Before
- public void setUp() {
- org = mock(Organization.class);
- approver = new Approver("approver", org);
- msg = new Message();
- }
-
- @Test
- public void testAddRequest() {
- approver.addRequest("user");
- approver.addRequest("user");
- }
-
- @Test
- public void testBuild() {
- approver.addRequest("user");
- approver.addRequest("user1");
- approver.addRequest("user2");
- approver.addRequest("user3");
- approver.build(msg);
- }
+ Approver approver;
+ Organization org;
+ Message msg;
+
+ @Before
+ public void setUp() {
+ org = mock(Organization.class);
+ approver = new Approver("approver", org);
+ msg = new Message();
+ }
+
+ @Test
+ public void testAddRequest() {
+ approver.addRequest("user");
+ approver.addRequest("user");
+ }
+
+ @Test
+ public void testBuild() {
+ approver.addRequest("user");
+ approver.addRequest("user1");
+ approver.addRequest("user2");
+ approver.addRequest("user3");
+ approver.build(msg);
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_CacheChange.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_CacheChange.java
index c029be13..fc934e6c 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_CacheChange.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_CacheChange.java
@@ -39,42 +39,42 @@ import org.junit.Test;
public class JU_CacheChange {
- CacheChange cc;
-
-
- @Before
- public void setUp() {
- cc = new CacheChange();
- }
-
- @Test
- public void testDelayedDelete() {
- cc.delayedDelete(null);
- }
+ CacheChange cc;
+
+
+ @Before
+ public void setUp() {
+ cc = new CacheChange();
+ }
+
+ @Test
+ public void testDelayedDelete() {
+ cc.delayedDelete(null);
+ }
- @Test
- public void testGetRemoved() {
- List list = cc.getRemoved();
- Assert.assertNotNull(list);
- }
-
- @Test
- public void testResetLocalData() {
- cc.resetLocalData();
- }
-
- @Test
- public void testCacheSize() {
- int size;
- size = cc.cacheSize();
- Assert.assertEquals(0, size);
- }
-
- @Test
- public void testContains() {
- boolean containsBools;
- containsBools = cc.contains(null);
- Assert.assertEquals(false, containsBools);
- }
+ @Test
+ public void testGetRemoved() {
+ List list = cc.getRemoved();
+ Assert.assertNotNull(list);
+ }
+
+ @Test
+ public void testResetLocalData() {
+ cc.resetLocalData();
+ }
+
+ @Test
+ public void testCacheSize() {
+ int size;
+ size = cc.cacheSize();
+ Assert.assertEquals(0, size);
+ }
+
+ @Test
+ public void testContains() {
+ boolean containsBools;
+ containsBools = cc.contains(null);
+ Assert.assertEquals(false, containsBools);
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Creator.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Creator.java
index f07aa820..ad4d2022 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Creator.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Creator.java
@@ -38,35 +38,35 @@ import static org.mockito.Mockito.*;
import org.junit.Test;
public class JU_Creator {
-
- CreatorStub creatorStub;
+
+ CreatorStub creatorStub;
- private class CreatorStub extends Creator{
+ private class CreatorStub extends Creator{
- @Override
- public Object create(Row row) {
- // TODO Auto-generated method stub
- return null;
- }
+ @Override
+ public Object create(Row row) {
+ // TODO Auto-generated method stub
+ return null;
+ }
- @Override
- public String select() {
- // TODO Auto-generated method stub
- return "Select"; //Changed from null to Select
- }
-
- }
-
- @Before
- public void setUp() {
- creatorStub = new CreatorStub();
- }
-
- @Test
- public void testQuery() {
- creatorStub.select();
- Assert.assertEquals("Select WHERE test;", creatorStub.query("test"));
- Assert.assertEquals("Select;", creatorStub.query(null));
- }
+ @Override
+ public String select() {
+ // TODO Auto-generated method stub
+ return "Select"; //Changed from null to Select
+ }
+
+ }
+
+ @Before
+ public void setUp() {
+ creatorStub = new CreatorStub();
+ }
+
+ @Test
+ public void testQuery() {
+ creatorStub.select();
+ Assert.assertEquals("Select WHERE test;", creatorStub.query("test"));
+ Assert.assertEquals("Select;", creatorStub.query(null));
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Cred.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Cred.java
index ad7fbe0c..35a63059 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Cred.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Cred.java
@@ -50,93 +50,93 @@ import java.util.Date;
import org.junit.Test;
public class JU_Cred {
-
- private ByteArrayOutputStream outStream;
- private ByteArrayOutputStream errStream;
- Cred cred;
- Instance instance;
- Date date;
- Integer integer;
- PropAccess prop;
- Define define = new Define();
- Trans trans;
- Session session;
- CredCount cc;
+
+ private ByteArrayOutputStream outStream;
+ private ByteArrayOutputStream errStream;
+ Cred cred;
+ Instance instance;
+ Date date;
+ Integer integer;
+ PropAccess prop;
+ Define define = new Define();
+ Trans trans;
+ Session session;
+ CredCount cc;
- @Before
- public void setUp() throws CadiException {
- outStream = new ByteArrayOutputStream();
- errStream = new ByteArrayOutputStream();
- System.setOut(new PrintStream(outStream));
- System.setErr(new PrintStream(errStream));
- date = new Date();
- integer = new Integer(20);
- trans = mock(Trans.class);
- session = mock(Session.class);
- cc = new CredCount(3);
- prop = new PropAccess();
- prop.setProperty(Config.AAF_ROOT_NS, "org.onap.aaf");
- prop.setProperty(Config.AAF_ROOT_COMPANY,"test");
- define.set(prop);
-
- instance = new Instance(12, date, integer, 125642678910L);
- cred = new Cred("myid1234@aaf.att.com");
- }
-
- @Test
- public void testLast() { //TODO: set instances
- Assert.assertNull(cred.last(null));
- }
-
- @Test
- public void testTypes() { //TODO: set instances
- Assert.assertNotNull(cred.types());
- }
-
- @Test
- public void testCount() { //TODO: set instances
- Assert.assertNotNull(cred.count(3));
- }
-
- @Test
- public void testToString() { //TODO: set instances
- Assert.assertEquals("myid1234@aaf.att.com[]", cred.toString());
- }
-
- @Test
- public void testHashCode() { //TODO: set instances
- Assert.assertEquals(-1619358251, cred.hashCode());
- }
-
- @Test
- public void testEquals() { //TODO: set instances
- Assert.assertEquals(true, cred.equals("myid1234@aaf.att.com"));
- }
-
- @Test
- public void testInc() {
- Date begin = new Date(date.getTime() - 10);
- Date after = new Date(date.getTime() + 10);
- cc.inc(-1, begin, after);
- cc.inc(1, begin, after);
- cc.inc(2, begin, after);
- cc.inc(200, begin, after);
- }
-
- @Test
- public void testAuthCount() { //TODO: set instances
- Assert.assertEquals(0, cc.authCount(1));
- }
-
- @Test
- public void testX509Count() { //TODO: set instances
- Assert.assertEquals(0, cc.x509Count(0));
- }
-
- @After
- public void cleanUp() {
- System.setErr(System.err);
- System.setOut(System.out);
- }
+ @Before
+ public void setUp() throws CadiException {
+ outStream = new ByteArrayOutputStream();
+ errStream = new ByteArrayOutputStream();
+ System.setOut(new PrintStream(outStream));
+ System.setErr(new PrintStream(errStream));
+ date = new Date();
+ integer = new Integer(20);
+ trans = mock(Trans.class);
+ session = mock(Session.class);
+ cc = new CredCount(3);
+ prop = new PropAccess();
+ prop.setProperty(Config.AAF_ROOT_NS, "org.onap.aaf");
+ prop.setProperty(Config.AAF_ROOT_COMPANY,"test");
+ define.set(prop);
+
+ instance = new Instance(12, date, integer, 125642678910L);
+ cred = new Cred("myid1234@aaf.att.com");
+ }
+
+ @Test
+ public void testLast() { //TODO: set instances
+ Assert.assertNull(cred.last(null));
+ }
+
+ @Test
+ public void testTypes() { //TODO: set instances
+ Assert.assertNotNull(cred.types());
+ }
+
+ @Test
+ public void testCount() { //TODO: set instances
+ Assert.assertNotNull(cred.count(3));
+ }
+
+ @Test
+ public void testToString() { //TODO: set instances
+ Assert.assertEquals("myid1234@aaf.att.com[]", cred.toString());
+ }
+
+ @Test
+ public void testHashCode() { //TODO: set instances
+ Assert.assertEquals(-1619358251, cred.hashCode());
+ }
+
+ @Test
+ public void testEquals() { //TODO: set instances
+ Assert.assertEquals(true, cred.equals("myid1234@aaf.att.com"));
+ }
+
+ @Test
+ public void testInc() {
+ Date begin = new Date(date.getTime() - 10);
+ Date after = new Date(date.getTime() + 10);
+ cc.inc(-1, begin, after);
+ cc.inc(1, begin, after);
+ cc.inc(2, begin, after);
+ cc.inc(200, begin, after);
+ }
+
+ @Test
+ public void testAuthCount() { //TODO: set instances
+ Assert.assertEquals(0, cc.authCount(1));
+ }
+
+ @Test
+ public void testX509Count() { //TODO: set instances
+ Assert.assertEquals(0, cc.x509Count(0));
+ }
+
+ @After
+ public void cleanUp() {
+ System.setErr(System.err);
+ System.setOut(System.out);
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Future.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Future.java
index 9d47c138..a3aef1c9 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Future.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Future.java
@@ -39,70 +39,70 @@ import java.util.UUID;
import org.junit.Test;
public class JU_Future {
-
- Future future;
- Date start;
- Date expires;
- ByteBuffer bBuff;
-
- @Before
- public void setUp() {
- UUID id = new UUID(0, 0);
- start = new Date();
- expires = new Date();
- future = new Future(id, "Re-Validate Ownership for AAF Namespace '\'test\'test","target",start, expires, bBuff);
- }
+
+ Future future;
+ Date start;
+ Date expires;
+ ByteBuffer bBuff;
+
+ @Before
+ public void setUp() {
+ UUID id = new UUID(0, 0);
+ start = new Date();
+ expires = new Date();
+ future = new Future(id, "Re-Validate Ownership for AAF Namespace '\'test\'test","target",start, expires, bBuff);
+ }
- @Test
- public void testId() {
- Assert.assertTrue(future.id() instanceof UUID);
- }
-
- @Test
- public void testMemo() {
- Assert.assertEquals("Re-Validate Ownership for AAF Namespace '\'test\'test", future.memo());
- }
-
- @Test
- public void testStart() {
- Assert.assertTrue(future.start() instanceof Date);
- }
-
- @Test
- public void testExpires() {
- Assert.assertTrue(future.expires() instanceof Date);
- }
-
- @Test
- public void testTarget() {
- Assert.assertEquals("target",future.target());
- }
-
- @Test
- public void testExpunge() {
- future.expunge();
- }
-
- @Test
- public void testCompareTo() {
- future.compareTo(null);
- future.compareTo(future);
- }
-
- @Test
- public void testResetLocalData() {
- future.resetLocalData();
- }
-
- @Test
- public void testSizeForDeletion() {
- Assert.assertEquals(0, future.sizeForDeletion());
- }
-
- @Test
- public void testPendingDelete() {
- Assert.assertEquals(false, future.pendingDelete(future));
- }
-
+ @Test
+ public void testId() {
+ Assert.assertTrue(future.id() instanceof UUID);
+ }
+
+ @Test
+ public void testMemo() {
+ Assert.assertEquals("Re-Validate Ownership for AAF Namespace '\'test\'test", future.memo());
+ }
+
+ @Test
+ public void testStart() {
+ Assert.assertTrue(future.start() instanceof Date);
+ }
+
+ @Test
+ public void testExpires() {
+ Assert.assertTrue(future.expires() instanceof Date);
+ }
+
+ @Test
+ public void testTarget() {
+ Assert.assertEquals("target",future.target());
+ }
+
+ @Test
+ public void testExpunge() {
+ future.expunge();
+ }
+
+ @Test
+ public void testCompareTo() {
+ future.compareTo(null);
+ future.compareTo(future);
+ }
+
+ @Test
+ public void testResetLocalData() {
+ future.resetLocalData();
+ }
+
+ @Test
+ public void testSizeForDeletion() {
+ Assert.assertEquals(0, future.sizeForDeletion());
+ }
+
+ @Test
+ public void testPendingDelete() {
+ Assert.assertEquals(false, future.pendingDelete(future));
+ }
+
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_History.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_History.java
index f617af9a..3346f229 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_History.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_History.java
@@ -38,31 +38,31 @@ import java.util.UUID;
import org.junit.Test;
public class JU_History {
-
- History history;
- History history1;
-
- @Before
- public void setUp() {
- UUID id = new UUID(0, 0);
- history = new History(id, "action", "memo", "subject", "target", "user", 5);
- history1 = new History(id, "action", "memo", "reconstruct", "subject", "target", "user", 5);
- }
+
+ History history;
+ History history1;
+
+ @Before
+ public void setUp() {
+ UUID id = new UUID(0, 0);
+ history = new History(id, "action", "memo", "subject", "target", "user", 5);
+ history1 = new History(id, "action", "memo", "reconstruct", "subject", "target", "user", 5);
+ }
- @Test
- public void testToString() {
- String result = "00000000-0000-0000-0000-000000000000 5 user, target, action, subject, memo";
- Assert.assertEquals(result, history.toString());
- }
-
- @Test
- public void testHashCode() {
- Assert.assertEquals(0, history.hashCode());
- }
-
- @Test
- public void testEquals() {
- Assert.assertFalse(history.equals(history1));
- }
-
+ @Test
+ public void testToString() {
+ String result = "00000000-0000-0000-0000-000000000000 5 user, target, action, subject, memo";
+ Assert.assertEquals(result, history.toString());
+ }
+
+ @Test
+ public void testHashCode() {
+ Assert.assertEquals(0, history.hashCode());
+ }
+
+ @Test
+ public void testEquals() {
+ Assert.assertFalse(history.equals(history1));
+ }
+
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_InputIterator.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_InputIterator.java
index fbb0d23a..c0a9a3cd 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_InputIterator.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_InputIterator.java
@@ -44,33 +44,33 @@ import java.io.Reader;
import org.junit.Test;
public class JU_InputIterator {
-
- InputIterator inputIterator;
- File f;
- BufferedReader bReader;
- PrintStream pStream;
-
- @Before
- public void setUp() throws IOException {
- f = new File("file");
- f.createNewFile();
- bReader = new BufferedReader(new FileReader(f));
- pStream = new PrintStream(f);
- inputIterator = new InputIterator(bReader, pStream, "prompt", "instructions");
- }
+
+ InputIterator inputIterator;
+ File f;
+ BufferedReader bReader;
+ PrintStream pStream;
+
+ @Before
+ public void setUp() throws IOException {
+ f = new File("file");
+ f.createNewFile();
+ bReader = new BufferedReader(new FileReader(f));
+ pStream = new PrintStream(f);
+ inputIterator = new InputIterator(bReader, pStream, "prompt", "instructions");
+ }
- @Test
- public void test() {
- inputIterator.iterator();
- inputIterator.iterator().hasNext();
- inputIterator.iterator().next();
- inputIterator.iterator().remove();
- }
-
- @After
- public void cleanUp() {
- if(f.exists()) {
- f.delete();
- }
- }
+ @Test
+ public void test() {
+ inputIterator.iterator();
+ inputIterator.iterator().hasNext();
+ inputIterator.iterator().next();
+ inputIterator.iterator().remove();
+ }
+
+ @After
+ public void cleanUp() {
+ if(f.exists()) {
+ f.delete();
+ }
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_MiscID.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_MiscID.java
index 816cda80..6f44b391 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_MiscID.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_MiscID.java
@@ -38,60 +38,60 @@ import static org.mockito.Mockito.*;
import org.junit.Test;
public class JU_MiscID {
-
- MiscID miscId;
-
- @Before
- public void setUp() {
- miscId = new MiscID();
- }
-
- @Test
- public void testRowSet() {
- Row row = mock(Row.class);
- miscId.set(row);
- }
-
- @Test
- public void testStringSet() throws BatchException {
- String[] strArr = {"id", "sponsor", "created", "renewal"};
- miscId.set(strArr);
- }
-
- @Test
- public void testHashcode() throws BatchException {
- String[] strArr = {"id", "sponsor", "created", "renewal"};
- miscId.set(strArr);
- Assert.assertEquals(3355, miscId.hashCode());
- }
-
- @Test
- public void testEquals() throws BatchException {
- String[] strArr = {"id", "sponsor", "created", "renewal"};
- miscId.set(strArr);
- Assert.assertFalse(miscId.equals("id"));
- Assert.assertTrue(miscId.equals(miscId));
- }
-
- @Test
- public void testInsertStmt() throws IllegalArgumentException, IllegalAccessException {
- String expected = "INSERT INTO authz.miscid (id,created,sponsor,renewal) VALUES ('null','null','null','null')";
- String result = miscId.insertStmt().toString();
- Assert.assertEquals(expected, result);
- }
-
- @Test
- public void testUpdateStmt() throws IllegalArgumentException, IllegalAccessException, BatchException {
- String expected = "UPDATE authz.miscid SET sponser='sponsor1',created='created1',renewal='renewal1' WHERE id='id'";
- String[] strArr = {"id", "sponsor", "created", "renewal"};
- miscId.set(strArr);
- MiscID miscId1 = new MiscID();
- String[] strArr1 = {"id", "sponsor1", "created1", "renewal1"};
- miscId1.set(strArr1);
- StringBuilder result = miscId.updateStmt(miscId1);
+
+ MiscID miscId;
+
+ @Before
+ public void setUp() {
+ miscId = new MiscID();
+ }
+
+ @Test
+ public void testRowSet() {
+ Row row = mock(Row.class);
+ miscId.set(row);
+ }
+
+ @Test
+ public void testStringSet() throws BatchException {
+ String[] strArr = {"id", "sponsor", "created", "renewal"};
+ miscId.set(strArr);
+ }
+
+ @Test
+ public void testHashcode() throws BatchException {
+ String[] strArr = {"id", "sponsor", "created", "renewal"};
+ miscId.set(strArr);
+ Assert.assertEquals(3355, miscId.hashCode());
+ }
+
+ @Test
+ public void testEquals() throws BatchException {
+ String[] strArr = {"id", "sponsor", "created", "renewal"};
+ miscId.set(strArr);
+ Assert.assertFalse(miscId.equals("id"));
+ Assert.assertTrue(miscId.equals(miscId));
+ }
+
+ @Test
+ public void testInsertStmt() throws IllegalArgumentException, IllegalAccessException {
+ String expected = "INSERT INTO authz.miscid (id,created,sponsor,renewal) VALUES ('null','null','null','null')";
+ String result = miscId.insertStmt().toString();
+ Assert.assertEquals(expected, result);
+ }
+
+ @Test
+ public void testUpdateStmt() throws IllegalArgumentException, IllegalAccessException, BatchException {
+ String expected = "UPDATE authz.miscid SET sponser='sponsor1',created='created1',renewal='renewal1' WHERE id='id'";
+ String[] strArr = {"id", "sponsor", "created", "renewal"};
+ miscId.set(strArr);
+ MiscID miscId1 = new MiscID();
+ String[] strArr1 = {"id", "sponsor1", "created1", "renewal1"};
+ miscId1.set(strArr1);
+ StringBuilder result = miscId.updateStmt(miscId1);
- Assert.assertEquals(expected, result.toString());
- }
+ Assert.assertEquals(expected, result.toString());
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_MonthData.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_MonthData.java
index 1fb9b248..cef81ded 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_MonthData.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_MonthData.java
@@ -42,64 +42,64 @@ import java.io.IOException;
import org.junit.Test;
public class JU_MonthData {
-
- File f;
- MonthData mData;
- Row row;
- BufferedWriter bw = null;
- FileWriter fw = null;
-
- @Before
- public void setUp() throws IOException {
- mData = new MonthData("env");
- row = new Row("target", 10,2,1);
- f = new File("Monthlyenv.dat");
- f.createNewFile();
- bw = new BufferedWriter(new FileWriter(f));
- bw.write("#test"+ "\n");
- bw.write("long,tester"+ "\n");
- bw.write("1,2,3,4,5"+ "\n");
- bw.close();
-
- mData = new MonthData("env");
- }
+
+ File f;
+ MonthData mData;
+ Row row;
+ BufferedWriter bw = null;
+ FileWriter fw = null;
+
+ @Before
+ public void setUp() throws IOException {
+ mData = new MonthData("env");
+ row = new Row("target", 10,2,1);
+ f = new File("Monthlyenv.dat");
+ f.createNewFile();
+ bw = new BufferedWriter(new FileWriter(f));
+ bw.write("#test"+ "\n");
+ bw.write("long,tester"+ "\n");
+ bw.write("1,2,3,4,5"+ "\n");
+ bw.close();
+
+ mData = new MonthData("env");
+ }
- @Test
- public void testAdd() {
- mData.add(2, "target", 10, 1, 1);
- }
-
- @Test
- public void testNotExists() {
- mData.notExists(2);
- }
-
- @Test
- public void testWrite() throws IOException {
- mData.write();
- }
-
- @Test
- public void testCompareTo() {
- Row testrow = new Row("testtar",1,1,1);
- Assert.assertEquals(-4, row.compareTo(testrow));
- Assert.assertEquals(0, row.compareTo(row));
- }
-
- @Test
- public void testToString() {
- Assert.assertEquals("target|10|1|2", row.toString());
- }
-
- @After
- public void cleanUp() {
- File g = new File("Monthlyenv.dat.bak");
- if(f.exists()) {
- f.delete();
- }
- if(g.exists()) {
- g.delete();
- }
- }
+ @Test
+ public void testAdd() {
+ mData.add(2, "target", 10, 1, 1);
+ }
+
+ @Test
+ public void testNotExists() {
+ mData.notExists(2);
+ }
+
+ @Test
+ public void testWrite() throws IOException {
+ mData.write();
+ }
+
+ @Test
+ public void testCompareTo() {
+ Row testrow = new Row("testtar",1,1,1);
+ Assert.assertEquals(-4, row.compareTo(testrow));
+ Assert.assertEquals(0, row.compareTo(row));
+ }
+
+ @Test
+ public void testToString() {
+ Assert.assertEquals("target|10|1|2", row.toString());
+ }
+
+ @After
+ public void cleanUp() {
+ File g = new File("Monthlyenv.dat.bak");
+ if(f.exists()) {
+ f.delete();
+ }
+ if(g.exists()) {
+ g.delete();
+ }
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_NS.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_NS.java
index 32c8a122..ec158c41 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_NS.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_NS.java
@@ -36,44 +36,44 @@ import static org.mockito.Mockito.*;
import org.junit.Test;
public class JU_NS {
-
- NS ns;
- NSSplit nSSplit;
-
- @Before
- public void setUp() {
- ns = new NS("name", "description", "parent", 1, 1);
- nSSplit = new NSSplit("string",1);
- }
+
+ NS ns;
+ NSSplit nSSplit;
+
+ @Before
+ public void setUp() {
+ ns = new NS("name", "description", "parent", 1, 1);
+ nSSplit = new NSSplit("string",1);
+ }
- @Test
- public void testToString() {
- Assert.assertEquals("name", ns.toString());
- }
-
- @Test
- public void testHashCode() {
- Assert.assertEquals(3373707, ns.hashCode());
- }
-
- @Test
- public void testEquals() {
- Assert.assertEquals(true, ns.equals("name"));
- Assert.assertEquals(false, ns.equals("name1"));
- }
-
- @Test
- public void testCompareTo() {
- NS nsValid = new NS("name", "description", "parent", 1, 1);
- Assert.assertEquals(0, ns.compareTo(nsValid));
-
- NS nsInvalid = new NS("name1", "description", "parent", 1, 1);
- Assert.assertEquals(-1, ns.compareTo(nsInvalid));
- }
-
- @Test
- public void testDeriveParent() {
- ns.deriveParent("d.ot.te.d");
- }
+ @Test
+ public void testToString() {
+ Assert.assertEquals("name", ns.toString());
+ }
+
+ @Test
+ public void testHashCode() {
+ Assert.assertEquals(3373707, ns.hashCode());
+ }
+
+ @Test
+ public void testEquals() {
+ Assert.assertEquals(true, ns.equals("name"));
+ Assert.assertEquals(false, ns.equals("name1"));
+ }
+
+ @Test
+ public void testCompareTo() {
+ NS nsValid = new NS("name", "description", "parent", 1, 1);
+ Assert.assertEquals(0, ns.compareTo(nsValid));
+
+ NS nsInvalid = new NS("name1", "description", "parent", 1, 1);
+ Assert.assertEquals(-1, ns.compareTo(nsInvalid));
+ }
+
+ @Test
+ public void testDeriveParent() {
+ ns.deriveParent("d.ot.te.d");
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_NsAttrib.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_NsAttrib.java
index b9c09dd9..a566f8d1 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_NsAttrib.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_NsAttrib.java
@@ -39,17 +39,17 @@ import static org.mockito.Mockito.*;
import org.junit.Test;
public class JU_NsAttrib {
-
- NsAttrib nsAttrib;
-
- @Before
- public void setUp() {
- nsAttrib = new NsAttrib("ns", "key", "value");
- }
-
- @Test
- public void testToString() {
- Assert.assertEquals("\"ns\",\"key\",\"value\"", nsAttrib.toString());
- }
+
+ NsAttrib nsAttrib;
+
+ @Before
+ public void setUp() {
+ nsAttrib = new NsAttrib("ns", "key", "value");
+ }
+
+ @Test
+ public void testToString() {
+ Assert.assertEquals("\"ns\",\"key\",\"value\"", nsAttrib.toString());
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Perm.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Perm.java
index 313eb978..0ccc77a2 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Perm.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Perm.java
@@ -39,60 +39,60 @@ import java.util.Set;
import org.junit.Test;
public class JU_Perm {
-
- Perm perm;
- Set set;
-
- @Before
- public void setUp() {
- set = new HashSet();
- perm = new Perm("ns","type", "instance", "action","description", set);
- }
+
+ Perm perm;
+ Set set;
+
+ @Before
+ public void setUp() {
+ set = new HashSet();
+ perm = new Perm("ns","type", "instance", "action","description", set);
+ }
- @Test
- public void testFullType() {
- Assert.assertEquals("ns.type", perm.fullType());
- }
-
- @Test
- public void testFullPerm() {
- Assert.assertEquals("ns.type|instance|action", perm.fullPerm());
- }
-
- @Test
- public void testEncode() {
- Assert.assertEquals("ns|type|instance|action", perm.encode());
- }
-
- @Test
- public void testHashCode() {
- Assert.assertEquals(850667666, perm.hashCode());
- }
-
- @Test
- public void testToString() {
- Assert.assertEquals("ns|type|instance|action", perm.toString());
- }
-
- @Test
- public void testEquals() {
- Perm perm1 = new Perm("ns","type", "instance", "action","description", set);
- Assert.assertEquals(false, perm.equals(perm1));
- }
-
- @Test
- public void testCompareTo() {
- Perm perm1 = new Perm("ns","type", "instance", "action","description", set);
- Perm perm2 = new Perm("ns1","type", "instance", "action","description", set);
-
- Assert.assertEquals(0, perm.compareTo(perm1));
- Assert.assertEquals(75, perm.compareTo(perm2));
- }
-
- @Test
- public void testStageRemove() {
- Perm perm1 = new Perm("ns","type", "instance", "action","description", set);
- perm.stageRemove(perm1);
- }
+ @Test
+ public void testFullType() {
+ Assert.assertEquals("ns.type", perm.fullType());
+ }
+
+ @Test
+ public void testFullPerm() {
+ Assert.assertEquals("ns.type|instance|action", perm.fullPerm());
+ }
+
+ @Test
+ public void testEncode() {
+ Assert.assertEquals("ns|type|instance|action", perm.encode());
+ }
+
+ @Test
+ public void testHashCode() {
+ Assert.assertEquals(850667666, perm.hashCode());
+ }
+
+ @Test
+ public void testToString() {
+ Assert.assertEquals("ns|type|instance|action", perm.toString());
+ }
+
+ @Test
+ public void testEquals() {
+ Perm perm1 = new Perm("ns","type", "instance", "action","description", set);
+ Assert.assertEquals(false, perm.equals(perm1));
+ }
+
+ @Test
+ public void testCompareTo() {
+ Perm perm1 = new Perm("ns","type", "instance", "action","description", set);
+ Perm perm2 = new Perm("ns1","type", "instance", "action","description", set);
+
+ Assert.assertEquals(0, perm.compareTo(perm1));
+ Assert.assertEquals(75, perm.compareTo(perm2));
+ }
+
+ @Test
+ public void testStageRemove() {
+ Perm perm1 = new Perm("ns","type", "instance", "action","description", set);
+ perm.stageRemove(perm1);
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Role.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Role.java
index fcfbec11..3fd9f870 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Role.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_Role.java
@@ -40,55 +40,55 @@ import java.util.Set;
import org.junit.Test;
public class JU_Role {
-
- Role shortRole;
- Role longRole;
- Set set;
-
- @Before
- public void setUp() {
- set = new HashSet();
- shortRole = new Role("full");
- longRole = new Role("ns", "name", "description", set);
- }
+
+ Role shortRole;
+ Role longRole;
+ Set set;
+
+ @Before
+ public void setUp() {
+ set = new HashSet();
+ shortRole = new Role("full");
+ longRole = new Role("ns", "name", "description", set);
+ }
- @Test
- public void testEncode() {
- Assert.assertEquals("ns|name", longRole.encode());
- }
-
- @Test
- public void testFullName() {
- Assert.assertEquals("ns.name", longRole.fullName());
- Assert.assertEquals("full", shortRole.fullName());
-
- longRole.fullName("test");
- }
-
- @Test
- public void testToString() {
- Assert.assertEquals("ns|name", longRole.toString());
- }
-
- @Test
- public void testHashCode() {
- Assert.assertEquals(-2043567518, longRole.hashCode());
- }
-
- @Test
- public void testEquals() {
- Assert.assertEquals(false, longRole.equals(longRole));
- }
-
- @Test
- public void testCompareTo() {
- Assert.assertEquals(-14, longRole.compareTo(shortRole));
- Assert.assertEquals(14, shortRole.compareTo(longRole));
- }
-
- @Test
- public void testStageRemove() {
- longRole.stageRemove(shortRole);
- }
+ @Test
+ public void testEncode() {
+ Assert.assertEquals("ns|name", longRole.encode());
+ }
+
+ @Test
+ public void testFullName() {
+ Assert.assertEquals("ns.name", longRole.fullName());
+ Assert.assertEquals("full", shortRole.fullName());
+
+ longRole.fullName("test");
+ }
+
+ @Test
+ public void testToString() {
+ Assert.assertEquals("ns|name", longRole.toString());
+ }
+
+ @Test
+ public void testHashCode() {
+ Assert.assertEquals(-2043567518, longRole.hashCode());
+ }
+
+ @Test
+ public void testEquals() {
+ Assert.assertEquals(false, longRole.equals(longRole));
+ }
+
+ @Test
+ public void testCompareTo() {
+ Assert.assertEquals(-14, longRole.compareTo(shortRole));
+ Assert.assertEquals(14, shortRole.compareTo(longRole));
+ }
+
+ @Test
+ public void testStageRemove() {
+ longRole.stageRemove(shortRole);
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_UserRole.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_UserRole.java
index ec94d7fc..b6ba7d48 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_UserRole.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/helpers/test/JU_UserRole.java
@@ -42,105 +42,105 @@ import java.util.Date;
import org.junit.Test;
public class JU_UserRole {
-
- UserRole userRole;
- UserRole userRole1;
- Date date;
- PrintStream ds;
-
- @Before
- public void setUp() {
- date = new Date();
- userRole = new UserRole("user", "ns", "rname", date);
- userRole = new UserRole("user", "role", "ns", "rname", date);
- }
+
+ UserRole userRole;
+ UserRole userRole1;
+ Date date;
+ PrintStream ds;
+
+ @Before
+ public void setUp() {
+ date = new Date();
+ userRole = new UserRole("user", "ns", "rname", date);
+ userRole = new UserRole("user", "role", "ns", "rname", date);
+ }
- @Test
- public void testTotalLoaded() {
- Assert.assertEquals(0, userRole.totalLoaded());
- }
-
- @Test
- public void testDeleted() {
- Assert.assertEquals(0, userRole.deleted());
- }
-
- @Test
- public void testExpunge() {
- userRole.expunge();
- }
-
- @Test
- public void testSetDeleteStream() {
- userRole.setDeleteStream(ds);
- }
-
- @Test
- public void testSetRecoverStream() {
- userRole.setRecoverStream(ds);
- }
-
- @Test
- public void testUrdd() {
- Assert.assertTrue(userRole.urdd() instanceof UserRoleDAO.Data);
- }
-
- @Test
- public void testUser() {
- Assert.assertEquals("user", userRole.user());
- }
-
- @Test
- public void testRole() {
- Assert.assertEquals("role", userRole.role());
- }
-
- @Test
- public void testNs() {
- Assert.assertEquals("ns", userRole.ns());
- }
-
- @Test
- public void testRName() {
- Assert.assertEquals("rname", userRole.rname());
- }
-
- @Test
- public void testExpires() {
- Assert.assertEquals(date, userRole.expires());
- userRole.expires(date);
- }
-
- @Test
- public void testToString() {
- Assert.assertTrue(userRole.toString() instanceof String);
- }
-
- @Test
- public void testGet() {
- userRole.get("u", "r");
- }
-
- @Test
- public void testResetLocalData() {
- userRole.resetLocalData();
- }
-
- @Test
- public void testSizeForDeletion() {
- Assert.assertEquals(0, userRole.sizeForDeletion());
- }
-
- @Test
- public void testPendingDelete() {
- Assert.assertFalse(userRole.pendingDelete(userRole));
- }
-
- @Test
- public void testActuateDeletionNow() {
- AuthzTrans trans = mock(AuthzTrans.class);
- URDelete urd = mock(URDelete.class);
- userRole.actuateDeletionNow(trans,urd);
- }
+ @Test
+ public void testTotalLoaded() {
+ Assert.assertEquals(0, userRole.totalLoaded());
+ }
+
+ @Test
+ public void testDeleted() {
+ Assert.assertEquals(0, userRole.deleted());
+ }
+
+ @Test
+ public void testExpunge() {
+ userRole.expunge();
+ }
+
+ @Test
+ public void testSetDeleteStream() {
+ userRole.setDeleteStream(ds);
+ }
+
+ @Test
+ public void testSetRecoverStream() {
+ userRole.setRecoverStream(ds);
+ }
+
+ @Test
+ public void testUrdd() {
+ Assert.assertTrue(userRole.urdd() instanceof UserRoleDAO.Data);
+ }
+
+ @Test
+ public void testUser() {
+ Assert.assertEquals("user", userRole.user());
+ }
+
+ @Test
+ public void testRole() {
+ Assert.assertEquals("role", userRole.role());
+ }
+
+ @Test
+ public void testNs() {
+ Assert.assertEquals("ns", userRole.ns());
+ }
+
+ @Test
+ public void testRName() {
+ Assert.assertEquals("rname", userRole.rname());
+ }
+
+ @Test
+ public void testExpires() {
+ Assert.assertEquals(date, userRole.expires());
+ userRole.expires(date);
+ }
+
+ @Test
+ public void testToString() {
+ Assert.assertTrue(userRole.toString() instanceof String);
+ }
+
+ @Test
+ public void testGet() {
+ userRole.get("u", "r");
+ }
+
+ @Test
+ public void testResetLocalData() {
+ userRole.resetLocalData();
+ }
+
+ @Test
+ public void testSizeForDeletion() {
+ Assert.assertEquals(0, userRole.sizeForDeletion());
+ }
+
+ @Test
+ public void testPendingDelete() {
+ Assert.assertFalse(userRole.pendingDelete(userRole));
+ }
+
+ @Test
+ public void testActuateDeletionNow() {
+ AuthzTrans trans = mock(AuthzTrans.class);
+ URDelete urd = mock(URDelete.class);
+ userRole.actuateDeletionNow(trans,urd);
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_Batch.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_Batch.java
index 752b98b7..5394c323 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_Batch.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_Batch.java
@@ -46,47 +46,47 @@ import org.junit.Test;
public class JU_Batch {
- AuthzEnv env;
- Batch batch;
-
- private class BatchStub extends Batch {
+ AuthzEnv env;
+ Batch batch;
+
+ private class BatchStub extends Batch {
- protected BatchStub(AuthzEnv env) throws APIException, IOException, OrganizationException {
- super(env);
- // TODO Auto-generated constructor stub
- }
+ protected BatchStub(AuthzEnv env) throws APIException, IOException, OrganizationException {
+ super(env);
+ // TODO Auto-generated constructor stub
+ }
- @Override
- protected void run(AuthzTrans trans) {
- // TODO Auto-generated method stub
-
- }
+ @Override
+ protected void run(AuthzTrans trans) {
+ // TODO Auto-generated method stub
+
+ }
- @Override
- protected void _close(AuthzTrans trans) {
- // TODO Auto-generated method stub
-
- }
+ @Override
+ protected void _close(AuthzTrans trans) {
+ // TODO Auto-generated method stub
+
+ }
- }
-
- @Before
- public void setUp() throws OrganizationException {
- env = new AuthzEnv();
- env.access().setProperty(Config.CADI_LATITUDE, "38.550674");
- env.access().setProperty(Config.CADI_LONGITUDE, "-90.146942");
- env.setProperty("DRY_RUN", "test");
- env.setProperty("Organization.@aaf.com", "test");
- //env.setProperty("Organization.com.@aaf", "java.lang.Integer");
- env.setProperty("Organization.com.@aaf", "org.onap.aaf.auth.org.Organization");
- env.setProperty("CASS_ENV", "test");
- env.setProperty("test.VERSION", "test.VERSION");
- }
-
- @Test
- public void testIsSpecial() throws APIException, IOException, OrganizationException {
- //BatchStub bStub = new BatchStub(env);
- //bStub.isSpecial("user");
- }
+ }
+
+ @Before
+ public void setUp() throws OrganizationException {
+ env = new AuthzEnv();
+ env.access().setProperty(Config.CADI_LATITUDE, "38.550674");
+ env.access().setProperty(Config.CADI_LONGITUDE, "-90.146942");
+ env.setProperty("DRY_RUN", "test");
+ env.setProperty("Organization.@aaf.com", "test");
+ //env.setProperty("Organization.com.@aaf", "java.lang.Integer");
+ env.setProperty("Organization.com.@aaf", "org.onap.aaf.auth.org.Organization");
+ env.setProperty("CASS_ENV", "test");
+ env.setProperty("test.VERSION", "test.VERSION");
+ }
+
+ @Test
+ public void testIsSpecial() throws APIException, IOException, OrganizationException {
+ //BatchStub bStub = new BatchStub(env);
+ //bStub.isSpecial("user");
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchException.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchException.java
index 9b2f2db0..c56a76c8 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchException.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchException.java
@@ -35,25 +35,25 @@ import org.junit.Test;
public class JU_BatchException {
- BatchException bExcept1;
- BatchException bExcept2;
- BatchException bExcept3;
- BatchException bExcept4;
- BatchException bExcept5;
- Throwable throwable;
-
- @Before
- public void setUp() {
- throwable = new Throwable();
- }
-
- @Test
- public void testBatchException() {
- bExcept1 = new BatchException();
- bExcept2 = new BatchException("test");
- bExcept3 = new BatchException(throwable);
- bExcept4 = new BatchException("test", throwable);
- bExcept5 = new BatchException("test", throwable,true,true);
- }
+ BatchException bExcept1;
+ BatchException bExcept2;
+ BatchException bExcept3;
+ BatchException bExcept4;
+ BatchException bExcept5;
+ Throwable throwable;
+
+ @Before
+ public void setUp() {
+ throwable = new Throwable();
+ }
+
+ @Test
+ public void testBatchException() {
+ bExcept1 = new BatchException();
+ bExcept2 = new BatchException("test");
+ bExcept3 = new BatchException(throwable);
+ bExcept4 = new BatchException("test", throwable);
+ bExcept5 = new BatchException("test", throwable,true,true);
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchPrincipal.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchPrincipal.java
index e3cd359f..6186df95 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchPrincipal.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_BatchPrincipal.java
@@ -36,13 +36,13 @@ import org.junit.Test;
public class JU_BatchPrincipal {
- BatchPrincipal bPrincipal;
-
- @Test
- public void testBatchPrincipal() {
- bPrincipal = new BatchPrincipal("name");
- Assert.assertEquals("batch:name", bPrincipal.getName());
- Assert.assertEquals("Btch", bPrincipal.tag());
- }
+ BatchPrincipal bPrincipal;
+
+ @Test
+ public void testBatchPrincipal() {
+ bPrincipal = new BatchPrincipal("name");
+ Assert.assertEquals("batch:name", bPrincipal.getName());
+ Assert.assertEquals("Btch", bPrincipal.tag());
+ }
}
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_CassBatch.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_CassBatch.java
index 0e7a4244..d1934a42 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_CassBatch.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/test/JU_CassBatch.java
@@ -39,29 +39,29 @@ import java.io.IOException;
import org.junit.Test;
public class JU_CassBatch {
-
- AuthzTrans aTrans;
-
- private class CassBatchStub extends CassBatch {
+
+ AuthzTrans aTrans;
+
+ private class CassBatchStub extends CassBatch {
- protected CassBatchStub(AuthzTrans trans, String log4jName)
- throws APIException, IOException, OrganizationException {
- super(trans, log4jName);
- // TODO Auto-generated constructor stub
- }
+ protected CassBatchStub(AuthzTrans trans, String log4jName)
+ throws APIException, IOException, OrganizationException {
+ super(trans, log4jName);
+ // TODO Auto-generated constructor stub
+ }
- @Override
- protected void run(AuthzTrans trans) {
- // TODO Auto-generated method stub
-
- }
-
- }
-
- @Before
- public void setUp() throws APIException, IOException, OrganizationException {
- aTrans = mock(AuthzTrans.class);
- //CassBatchStub cassBatchStub = new CassBatchStub(aTrans,"log"); //Cannot do until Batch is understood
- }
+ @Override
+ protected void run(AuthzTrans trans) {
+ // TODO Auto-generated method stub
+
+ }
+
+ }
+
+ @Before
+ public void setUp() throws APIException, IOException, OrganizationException {
+ aTrans = mock(AuthzTrans.class);
+ //CassBatchStub cassBatchStub = new CassBatchStub(aTrans,"log"); //Cannot do until Batch is understood
+ }
}