summaryrefslogtreecommitdiffstats
path: root/cadi/core/src/test/java
diff options
context:
space:
mode:
authorIanHowell <ian.howell@att.com>2018-05-21 11:01:21 -0500
committerIanHowell <ian.howell@att.com>2018-05-21 11:01:26 -0500
commitee51fce2672cd41a0c9ec630365e0b9fd62f22b6 (patch)
treec5bcd2230237d7d2738ff89feb36ec10082214de /cadi/core/src/test/java
parent3609e1a0f524988c0158b8065f805976f88ae989 (diff)
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 <ian.howell@att.com>
Diffstat (limited to 'cadi/core/src/test/java')
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfo.java11
1 files changed, 11 insertions, 0 deletions
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 {