Test case addition for sdnc code coverage
[sdnc/northbound.git] / generic-resource-api / provider / src / test / java / org / onap / sdnc / northbound / GenericConfigurationNotificationRPCTest.java
1 package org.onap.sdnc.northbound;
2
3 import org.junit.Before;
4 import org.junit.Test;
5 import org.junit.runner.RunWith;
6 import org.mockito.runners.MockitoJUnitRunner;
7 import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.GenericConfigurationNotificationInput;
8 import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.GenericConfigurationNotificationOutput;
9 import org.opendaylight.yangtools.yang.common.RpcResult;
10 import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.service.information.ServiceInformationBuilder;
11
12 import static org.junit.Assert.assertNull;
13 import static org.onap.sdnc.northbound.util.MDSALUtil.*;
14
15 @RunWith(MockitoJUnitRunner.class)
16 public class GenericConfigurationNotificationRPCTest extends GenericResourceApiProviderTest {
17
18     private static final String SVC_OPERATION = "generic-configuration-notification";
19
20     @Before
21     public void setUp() throws Exception {
22         super.setUp();
23         svcClient.setScvOperation(SVC_OPERATION);
24     }
25
26     @Test
27     public void should_complete_with_success_when_no_errors() throws Exception {
28
29         GenericConfigurationNotificationInput input = build(GenericConfigurationNotificationInput()
30                 .setServiceInformation(new ServiceInformationBuilder().setServiceInstanceId("serviceInstanceId").build()));
31
32         GenericConfigurationNotificationOutput output =
33                 exec(genericResourceApiProvider::genericConfigurationNotification, input, RpcResult::getResult);
34
35         assertNull(output);
36     }
37 }
38