summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2019-04-04 15:29:50 +0530
committerTakamune Cho <takamune.cho@att.com>2019-04-04 13:33:20 +0000
commit34a0aee0ba91e8cda9ca94b8442d8645baf995b7 (patch)
tree6714a4ca0d766e77b234c6d735039f98218ccb68
parente806a30d05b89bb61cf5a6fad4458c6333d0b6f4 (diff)
added test case to TestController.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: Id6718c61982a477373c8a5af76f7c7d6a61c43c1 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
-rw-r--r--appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/impl/TestController.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/impl/TestController.java b/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/impl/TestController.java
index ea40fcc72..ccea14cef 100644
--- a/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/impl/TestController.java
+++ b/appc-event-listener/appc-event-listener-bundle/src/test/java/org/onap/appc/listener/impl/TestController.java
@@ -8,6 +8,8 @@
* ================================================================================
* Modifications Copyright (C) 2019 Ericsson
* =============================================================================
+ * Modifications Copyright (C) 2019 IBM
+ * =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -25,6 +27,8 @@
package org.onap.appc.listener.impl;
+import static org.junit.Assert.assertTrue;
+
import java.util.HashSet;
import java.util.Map;
import java.util.Properties;
@@ -59,6 +63,14 @@ public class TestController {
new ControllerImpl(properties);
Mockito.verify(properties).remove(Mockito.any());
}
+
+ @Test
+ public void testListeners() {
+ listenerProperties = Mockito.mock(ListenerProperties.class);
+ properties.add(listenerProperties);
+ assertTrue(new ControllerImpl(properties).getListeners() instanceof Map);
+
+ }
@Test
public void testStartException() throws NoSuchMethodException, SecurityException {