summaryrefslogtreecommitdiffstats
path: root/auth/auth-batch/src/test/java/org
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-03-14 14:30:00 -0500
committerInstrumental <jonathan.gathman@att.com>2019-03-14 14:32:26 -0500
commit502da3cb1daf171395630dbaf4a2f2e2fb9aa93e (patch)
tree0d3229b79197f2b8f21d9b85ed96e92d8e816567 /auth/auth-batch/src/test/java/org
parent13b7a3bc25fba512024f2e599be3eb132b0c7b16 (diff)
Change Sonar flagged code
Issue-ID: AAF-788 Change-Id: Ib4a2f69be5b0c9d85d30855cedbb786d21ac56cc Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-batch/src/test/java/org')
-rw-r--r--auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/test/JU_ExpireRange.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/test/JU_ExpireRange.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/test/JU_ExpireRange.java
index 5b337d52..f64bdfc0 100644
--- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/test/JU_ExpireRange.java
+++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/test/JU_ExpireRange.java
@@ -22,6 +22,7 @@ package org.onap.aaf.auth.batch.helpers.test;
import static org.junit.Assert.*;
+import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Set;
@@ -33,6 +34,7 @@ public class JU_ExpireRange {
@Test
public void test() {
ExpireRange expRange = new ExpireRange(new PropAccess());
+ Date now = expRange.now();
Set<String> names=expRange.names();
assertTrue(names.contains("OneMonth"));
@@ -46,7 +48,7 @@ public class JU_ExpireRange {
String[] all = new String[] {"ur","cred"};
// Test 3 weeks prior
- gc.setTime(expRange.now);
+ gc.setTime(now);
gc.add(GregorianCalendar.WEEK_OF_MONTH,-3);
for(String rs : all) {
r = expRange.getRange(rs, gc.getTime());
@@ -56,7 +58,7 @@ public class JU_ExpireRange {
}
// Test 1 week prior
- gc.setTime(expRange.now);
+ gc.setTime(now);
gc.add(GregorianCalendar.WEEK_OF_MONTH,-1);
for(String rs : all) {
r = expRange.getRange(rs, gc.getTime());
@@ -64,7 +66,7 @@ public class JU_ExpireRange {
}
// Test Today
- r = expRange.getRange("cred", expRange.now);
+ r = expRange.getRange("cred", now);
assertNotNull(r);
}