From ee51fce2672cd41a0c9ec630365e0b9fd62f22b6 Mon Sep 17 00:00:00 2001 From: IanHowell Date: Mon, 21 May 2018 11:01:21 -0500 Subject: Improve coverage of cadi-core * Fix some of the Sonar issues in SecurityInfo * Improve coverage of SecurityInfo Issue-ID: AAF-225 Change-Id: I1a7c6e5ad9d0444cd8441bccf2c79ad79d9d3ddb Signed-off-by: IanHowell --- .../java/org/onap/aaf/cadi/config/test/JU_SecurityInfo.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cadi/core/src/test') diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfo.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfo.java index 842a7098..001d0fe6 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfo.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfo.java @@ -97,6 +97,9 @@ public class JU_SecurityInfo { assertNotNull(si.getSSLSocketFactory()); assertNotNull(si.getSSLContext()); assertNotNull(si.getKeyManagers()); + + access.setProperty(Config.CADI_TRUST_MASKS, "123.123.123.123"); + si = new SecurityInfo(access); } @Test(expected = CadiException.class) @@ -112,6 +115,14 @@ public class JU_SecurityInfo { @SuppressWarnings("unused") SecurityInfo si = new SecurityInfo(access); } + + + @Test(expected = NumberFormatException.class) + public void badTrustMaskTest() throws CadiException { + access.setProperty(Config.CADI_TRUST_MASKS, "trustMask"); + @SuppressWarnings("unused") + SecurityInfo si = new SecurityInfo(access); + } @Test public void coverageTest() throws CadiException { -- cgit 1.2.3-korg