summaryrefslogtreecommitdiffstats
path: root/sdnr/northbound/energysavings/provider/src/test
diff options
context:
space:
mode:
authorCLAPP, GEORGE H (gc731h) <gc731h@att.com>2018-07-19 20:14:51 +0000
committerCLAPP, GEORGE H (gc731h) <gc731h@att.com>2018-07-19 21:30:08 +0000
commit026500f89289120c4d946c9e2cb8e94e37d6751f (patch)
tree132fd79f1f41784d77daf87cc6db36900220cba9 /sdnr/northbound/energysavings/provider/src/test
parent10cd619b5e6e34b22b3239a2516f1ca491c87a3a (diff)
Rename package to new ccsdk/features repo
Rename the energysavings package to align with new ccsdk/features repo and update file structure Change-Id: I9404cc2aca5e6f3abe8decd89987478a7d6db295 Issue-ID: CCSDK-350 Signed-off-by: CLAPP, GEORGE H (gc731h) <gc731h@att.com>
Diffstat (limited to 'sdnr/northbound/energysavings/provider/src/test')
-rw-r--r--sdnr/northbound/energysavings/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/energysavings/EnergysavingsProviderTest.java47
1 files changed, 47 insertions, 0 deletions
diff --git a/sdnr/northbound/energysavings/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/energysavings/EnergysavingsProviderTest.java b/sdnr/northbound/energysavings/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/energysavings/EnergysavingsProviderTest.java
new file mode 100644
index 000000000..21e894cae
--- /dev/null
+++ b/sdnr/northbound/energysavings/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/energysavings/EnergysavingsProviderTest.java
@@ -0,0 +1,47 @@
+package org.onap.ccsdk.features.sdnr.northbound.energysavings;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
+import java.util.concurrent.Future;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.energysavings.rev150105.PayloadInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.energysavings.rev150105.PayloadOutput;
+import org.opendaylight.yangtools.yang.common.RpcResult;
+import com.sun.jersey.api.client.WebResource;
+
+public class EnergysavingsProviderTest {
+
+ private EnergysavingsProvider esProvider;
+ private PayloadInput input;
+
+ @Before
+ public void setUp() throws Exception {
+ DataBroker dataBroker = mock(DataBroker.class);
+ RpcProviderRegistry rpcRegistry = mock(RpcProviderRegistry.class);
+ esProvider = new EnergysavingsProvider(dataBroker, rpcRegistry);
+ }
+
+ @After
+ public void tearDown() throws Exception {}
+
+ @Test
+ public void testDmaapWebResource() {
+ WebResource dmaapWebResource = esProvider.getDmaapSdnrToPolicyWebResource();
+ // fail("Not yet implemented");
+ }
+
+ @Test
+ public void testNullInput() {
+ Future<RpcResult<PayloadOutput>> futureOutput = esProvider.payload(null);
+ try {
+ PayloadOutput output = futureOutput.get().getResult();
+ output.getResult().equals("Input is null");
+ } catch (Exception e) {
+ }
+ }
+
+}