Test case addition for sdnc code coverage 57/93257/1
authorprakash.e <prakash.e@huawei.com>
Sat, 10 Aug 2019 15:40:36 +0000 (21:10 +0530)
committerprakash.e <prakash.e@huawei.com>
Sat, 10 Aug 2019 15:41:00 +0000 (21:11 +0530)
Test case added for GenericConfigurationTopologyOperation

Change-Id: I9b7c8753bf1899a4933d69a417b475169dfa0f59
Issue-ID: SDNC-840
Signed-off-by: Prakash.E <prakash.e@huawei.com>
generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GenericConfigurationNotificationRPCTest.java [new file with mode: 0644]

diff --git a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GenericConfigurationNotificationRPCTest.java b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GenericConfigurationNotificationRPCTest.java
new file mode 100644 (file)
index 0000000..5d61180
--- /dev/null
@@ -0,0 +1,38 @@
+package org.onap.sdnc.northbound;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.GenericConfigurationNotificationInput;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.GenericConfigurationNotificationOutput;
+import org.opendaylight.yangtools.yang.common.RpcResult;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.service.information.ServiceInformationBuilder;
+
+import static org.junit.Assert.assertNull;
+import static org.onap.sdnc.northbound.util.MDSALUtil.*;
+
+@RunWith(MockitoJUnitRunner.class)
+public class GenericConfigurationNotificationRPCTest extends GenericResourceApiProviderTest {
+
+    private static final String SVC_OPERATION = "generic-configuration-notification";
+
+    @Before
+    public void setUp() throws Exception {
+        super.setUp();
+        svcClient.setScvOperation(SVC_OPERATION);
+    }
+
+    @Test
+    public void should_complete_with_success_when_no_errors() throws Exception {
+
+        GenericConfigurationNotificationInput input = build(GenericConfigurationNotificationInput()
+                .setServiceInformation(new ServiceInformationBuilder().setServiceInstanceId("serviceInstanceId").build()));
+
+        GenericConfigurationNotificationOutput output =
+                exec(genericResourceApiProvider::genericConfigurationNotification, input, RpcResult::getResult);
+
+        assertNull(output);
+    }
+}
+