1 package org.onap.sdnc.northbound;
3 import org.junit.Before;
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.GetpathsegmentTopologyOperationInput;
8 import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.GetpathsegmentTopologyOperationOutput;
9 import org.opendaylight.yangtools.yang.common.RpcResult;
11 import static org.junit.Assert.assertEquals;
12 import static org.onap.sdnc.northbound.util.MDSALUtil.*;
14 @RunWith(MockitoJUnitRunner.class)
15 public class GetpathsegmentTopologyOperationRPCTest extends GenericResourceApiProviderTest {
17 private static final String SVC_OPERATION = "getpathsegment-topology-operation";
20 public void setUp() throws Exception {
22 svcClient.setScvOperation(SVC_OPERATION);
26 public void should_fail_when_invalid_vnf_topology() throws Exception {
28 GetpathsegmentTopologyOperationInput input = build(GetpathsegmentTopologyOperationInput());
30 GetpathsegmentTopologyOperationOutput output =
31 exec(genericResourceApiProvider::getpathsegmentTopologyOperation, input, RpcResult::getResult);
33 assertEquals("404", output.getResponseCode());
34 assertEquals("invalid input, null or empty service-instance-id", output.getResponseMessage());
35 assertEquals("Y", output.getAckFinalIndicator());