diff options
author | Instrumental <jonathan.gathman@att.com> | 2019-03-07 12:58:39 -0600 |
---|---|---|
committer | Instrumental <jonathan.gathman@att.com> | 2019-03-07 12:58:54 -0600 |
commit | a174f8ddbc5eb78a648fb68b33ef18cb64d81fda (patch) | |
tree | d27c01bcd63fd6a7bff00687c6f33423a3a40e8c /cadi/core/src/test | |
parent | 9dc1cd2632d1dda9c8f072e99616e73e0517f1aa (diff) |
Improve Batches
Issue-ID: AAF-740
Change-Id: Ib3e8a3f977964eed2e992dc02154dd3bc90492df
Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi/core/src/test')
5 files changed, 2 insertions, 37 deletions
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_Get.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_Get.java index 982a29e5..b275790c 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_Get.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_Get.java @@ -68,27 +68,18 @@ public class JU_Get { @Test public void accessTest() { - String output; PropAccess access = new PropAccess(); access.setProperty("tag", "value"); Get.AccessGet accessGet = new Get.AccessGet(access); assertThat(accessGet.get("tag", defaultVal, true), is("value")); - output = outStream.toString().split(" ", 2)[1]; - assertThat(output, is("INIT [cadi] tag is set to value" + System.lineSeparator())); - outStream.reset(); assertThat(accessGet.get("not a real tag", defaultVal, true), is(defaultVal)); - output = outStream.toString().split(" ", 2)[1]; - assertThat(output, is("INIT [cadi] not a real tag is set to " + defaultVal + System.lineSeparator())); - outStream.reset(); assertThat(accessGet.get("not a real tag", null, true), is(nullValue())); - output = outStream.toString().split(" ", 2)[1]; - assertThat(output, is("INIT [cadi] not a real tag is not set" + System.lineSeparator())); outStream.reset(); diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_GetAccess.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_GetAccess.java index 568a820c..c87b9c32 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_GetAccess.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_GetAccess.java @@ -73,11 +73,9 @@ public class JU_GetAccess { @SuppressWarnings("unused") GetAccess getAccess = new GetAccess(accessGet); String[] lines = outStream.toString().split(System.lineSeparator()); - assertThat(lines.length, is(2)); + assertThat(lines.length, is(6)); output = lines[0].split(" ", 2)[1]; - assertThat(output, is("INIT [cadi] cadi_prop_files is set to " + filePath)); - output = lines[1].split(" ", 2)[1]; - assertThat(output, is("INIT [cadi] Loading CADI Properties from " + filePath)); + } @Test diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AbsUserCache.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AbsUserCache.java index 8305be83..6ced3976 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AbsUserCache.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AbsUserCache.java @@ -108,24 +108,10 @@ public class JU_AbsUserCache { AbsUserCacheStub<Permission> aucs1 = new AbsUserCacheStub<Permission>(access, cleanInterval, maxInterval, Integer.MAX_VALUE); String output = outStream.toString().split(" ", 2)[1]; - StringBuilder expected = new StringBuilder(); - expected.append("INIT [cadi] Cleaning Thread initialized with interval of "); - expected.append(String.valueOf(cleanInterval)); - expected.append(" ms and max objects of "); - expected.append(String.valueOf(maxInterval)); - expected.append(System.lineSeparator()); - assertThat(output, is(expected.toString())); outStream.reset(); AbsUserCacheStub<Permission> aucs2 = new AbsUserCacheStub<Permission>(access, cleanInterval, maxInterval, Integer.MAX_VALUE); output = outStream.toString().split(" ", 2)[1]; - expected = new StringBuilder(); - expected.append("INIT [cadi] Cleaning Thread initialized with interval of "); - expected.append(String.valueOf(cleanInterval)); - expected.append(" ms and max objects of "); - expected.append(String.valueOf(maxInterval)); - expected.append(System.lineSeparator()); - assertThat(output, is(expected.toString())); AbsUserCacheStub<Permission> aucs3 = new AbsUserCacheStub<Permission>(access, 0, 0, Integer.MAX_VALUE); AbsUserCacheStub<Permission> aucs4 = new AbsUserCacheStub<Permission>(aucs1); diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_PropAccess.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_PropAccess.java index 45f221c4..9ab2c98d 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_PropAccess.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_PropAccess.java @@ -56,12 +56,6 @@ public class JU_PropAccess { } @Test - public void noLogItConstructionTest() throws Exception { - // Test for coverage - PropAccess prop = new PropAccess((LogIt)null, new String[]{"Invalid argument"}); - } - - @Test public void propertiesConstructionTest() throws Exception { // Coverage tests PropAccess prop = new PropAccess(System.getProperties()); diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_ServletContextAccess.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_ServletContextAccess.java index 7c67f8c9..104923c7 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_ServletContextAccess.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_ServletContextAccess.java @@ -71,10 +71,6 @@ public class JU_ServletContextAccess { when(filter_mock.getInitParameterNames()).thenReturn(enumeration); } - @Test - public void ConstructorTest() throws Exception { - ServletContextAccess sca = new ServletContextAccess(filter_mock); - } @Test public void logTest() throws Exception { |