From 119808a2ded9ea8c4dd9d1eef96f39ab2e001ff7 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Tue, 3 Oct 2017 04:04:30 -0400 Subject: Add unit test for ueb-listener Add unit test case for ueb-listener. Change-Id: Ia61f8e5bc0e817aa0f4a042d8e05b02ec9e2013b Issue-ID: CCSDK-106 Signed-off-by: Dan Timoney --- .../northbound/uebclient/TestSdncUebCallback.java | 30 ++++++++++++++++++++++ .../src/test/resources/ueb-listener.properties | 19 ++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java create mode 100755 ueb-listener/src/test/resources/ueb-listener.properties (limited to 'ueb-listener/src/test') diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java new file mode 100644 index 00000000..93fadc98 --- /dev/null +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java @@ -0,0 +1,30 @@ +package org.onap.ccsdk.sli.northbound.uebclient; + +import static org.junit.Assert.*; + +import org.junit.Before; +import org.junit.Test; +import org.openecomp.sdc.api.IDistributionClient; +import org.openecomp.sdc.api.notification.INotificationData; + +import static org.mockito.Mockito.mock; + +public class TestSdncUebCallback { + SdncUebConfiguration config; + + @Before + public void setUp() throws Exception { + config = new SdncUebConfiguration("src/test/resources"); + } + + @Test + public void test() { + + IDistributionClient iDistClient = mock(IDistributionClient.class); + SdncUebCallback cb = new SdncUebCallback(iDistClient, config); + + INotificationData iData = mock(INotificationData.class); + cb.activateCallback(iData); + } + +} diff --git a/ueb-listener/src/test/resources/ueb-listener.properties b/ueb-listener/src/test/resources/ueb-listener.properties new file mode 100755 index 00000000..7855b211 --- /dev/null +++ b/ueb-listener/src/test/resources/ueb-listener.properties @@ -0,0 +1,19 @@ +org.openecomp.sdnc.uebclient.asdc-address=localhost:1234 +org.openecomp.sdnc.uebclient.consumer-group=ccsdk1 +org.openecomp.sdnc.uebclient.consumer-id=localhost_ccsdk1 +org.openecomp.sdnc.uebclient.environment-name=UNITTEST +org.openecomp.sdnc.uebclient.password=123456 +org.openecomp.sdnc.uebclient.user=test +org.openecomp.sdnc.uebclient.sdnc-user=test +org.openecomp.sdnc.uebclient.sdnc-passwd=test +org.openecomp.sdnc.uebclient.asdc-api-base-url=http://localhost:8282/restconf/operations/ +org.openecomp.sdnc.uebclient.asdc-api-namespace=org:onap:ccsdk +org.openecomp.sdnc.uebclient.spool.incoming=src/test/resources/incoming +org.openecomp.sdnc.uebclient.spool.archive=src/test/resources/archive +org.openecomp.sdnc.uebclient.polling-interval=30 +org.openecomp.sdnc.uebclient.polling-timeout=15 +org.openecomp.sdnc.uebclient.relevant-artifact-types=YANG_XML,VF_LICENSE,TOSCA_TEMPLATE,TOSCA_CSAR,UCPE_LAYER_2_CONFIGURATION +org.openecomp.sdnc.uebclient.activate-server-tls-auth=false +org.openecomp.sdnc.uebclient.keystore-path= +org.openecomp.sdnc.uebclient.keystore-password= +org.openecomp.sdnc.uebclient.xslt-path-list=src/main/resources/removeNs.xslt,src/main/resources/normalizeTagNames.xslt -- cgit 1.2.3-korg