diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2018-09-11 18:50:52 +0530 |
---|---|---|
committer | Takamune Cho <tc012c@att.com> | 2018-09-11 14:39:49 +0000 |
commit | 5fb7cd971b57bb25ce7fb01b27576d02777558e5 (patch) | |
tree | 31dbe5e3f79e07e05339c1f6c1ffdda28d126803 /appc-config/appc-config-adaptor/provider/src/test | |
parent | eb3caaa3717bff67a566585dd0b1bd34b2dc3b04 (diff) |
added test case to ConfigComponentAdaptorTest
to increase code coverage
Issue-ID: APPC-1086
Change-Id: I49259f114ed7e180c0dd4d71de11da331634dc12
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-config/appc-config-adaptor/provider/src/test')
-rw-r--r-- | appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java b/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java index e7c00a56b..1cf9b8ecf 100644 --- a/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java +++ b/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java @@ -306,5 +306,29 @@ public class ConfigComponentAdaptorTest { String result = Whitebox.invokeMethod(cca, "prepare", ctx, "test", "test"); Assert.assertEquals("template", result); } + + @Test + public void testConstructorForNonNullProperties() throws Exception { + Properties props = new Properties(); + props.setProperty("configComponent.url", "testConfigUrl"); + props.setProperty("configComponent.user", "testConfigUser"); + props.setProperty("configComponent.passwd", "testConfigPwd"); + props.setProperty("auditComponent.url", "testAuditUrl"); + props.setProperty("auditComponent.user", "testAuditUser"); + props.setProperty("auditComponent.passwd", "testAuditPwd"); + props.setProperty("service-configuration-notification-url", "testServiceNotificationUrl"); + props.setProperty("audit-configuration-notification-url", "testAuditNotificationUrl"); + + ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props); + Assert.assertEquals("testConfigUrl", cca.getConfigUrl()); + Assert.assertEquals("testConfigUser", cca.getConfigUser()); + Assert.assertEquals("testConfigPwd", cca.getConfigPassword()); + Assert.assertEquals("testAuditUrl", cca.getAuditUrl()); + Assert.assertEquals("testAuditUser", cca.getAuditUser()); + Assert.assertEquals("testAuditPwd", cca.getAuditPassword()); + Assert.assertEquals("testServiceNotificationUrl", cca.getConfigCallbackUrl()); + Assert.assertEquals("testAuditNotificationUrl", cca.getAuditCallbackUrl()); + + } } |