diff options
author | Instrumental <jonathan.gathman@att.com> | 2019-02-03 06:09:34 -0600 |
---|---|---|
committer | Instrumental <jonathan.gathman@att.com> | 2019-02-03 06:09:46 -0600 |
commit | 59ffb7d529245c3bd0233dbf6cb0ae9fe9ccb856 (patch) | |
tree | 48f79984b766211d0f570f50485cbe288dd2f990 /cadi/core/src/test | |
parent | e36daf12cf4c5aa4b22fa3cec66a79ff2e2b8b94 (diff) |
Approval Batch, prep better JUnit
Issue-ID: AAF-740
Change-Id: Id9e8ca121c9bf92c2f98c7a61631e2417bba70b1
Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi/core/src/test')
3 files changed, 7 insertions, 10 deletions
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_MapBathConverter.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_MapBathConverter.java index 9db542db..d9a5a0eb 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_MapBathConverter.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_MapBathConverter.java @@ -62,7 +62,7 @@ public class JU_MapBathConverter { public static void createFile() throws IOException { // Note, you cate a "MapBathConverter" by access to a File. // We will create that file now. Local is fine. - csv = new CSV("JU_MapBathConverter.csv"); + csv = new CSV(access,"JU_MapBathConverter.csv"); } @BeforeClass @@ -109,7 +109,7 @@ public class JU_MapBathConverter { break; case 2: try { - Date d = Date.valueOf(s); + Date.valueOf(s); } catch (Exception e) { Assert.assertTrue("Last entry should be a date",false); } @@ -199,7 +199,7 @@ public class JU_MapBathConverter { @Test public void testNoFile() { try { - new MapBathConverter(access, new CSV("Bogus")); + new MapBathConverter(access, new CSV(access,"Bogus")); Assert.fail("Non Existent File should throw exception"); } catch(CadiException | IOException e) { Assert.assertTrue("Correctly thrown Exception",true); diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_RegistrationPropHolder.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_RegistrationPropHolder.java index f3e05d9b..46fd741d 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_RegistrationPropHolder.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_RegistrationPropHolder.java @@ -85,12 +85,6 @@ public class JU_RegistrationPropHolder { String ns2 = "onap"; pa.setProperty(Config.AAF_LOCATOR_NS+".helm", ns2); for(String dot_le : new String[] {"",".helm"}) { - String pns; - if(dot_le.isEmpty()) { - pns = ns; - } else { - pns = ns2; - } assertEquals(rph.hostname,rph.default_fqdn); assertEquals("",rph.lcontainer); assertEquals(rph.hostname,rph.public_hostname); diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_CSV.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_CSV.java index 54c48daf..9df6de7b 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_CSV.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_CSV.java @@ -34,7 +34,9 @@ import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; +import org.onap.aaf.cadi.Access; import org.onap.aaf.cadi.CadiException; +import org.onap.aaf.cadi.PropAccess; import org.onap.aaf.cadi.util.CSV; import org.onap.aaf.cadi.util.CSV.Visitor; import org.onap.aaf.cadi.util.CSV.Writer; @@ -65,7 +67,8 @@ public class JU_CSV { @Test public void test() throws IOException, CadiException { - CSV csv = new CSV(file); + Access access = new PropAccess(); + CSV csv = new CSV(access,file); // Can't visit for file that doesn't exist try { csv.visit(new Visitor() { |