aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-08-12 13:13:00 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-12 13:13:00 +0000
commit469177434763abf310abf7b5d2dbbf6c19485b23 (patch)
treed2507cab24872acb69d315a12e0893259d142dc2
parentbe9ca669e992cd3b7f851f7788c32697579aa129 (diff)
parent371f7320e206fe43993b8f052ca05e0a2c03f33d (diff)
Merge "New test case added for SDNC code coverage"
-rw-r--r--generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GetpathsegmentTopologyOperationRPCTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GetpathsegmentTopologyOperationRPCTest.java b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GetpathsegmentTopologyOperationRPCTest.java
index e97df5d9..2e24204a 100644
--- a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GetpathsegmentTopologyOperationRPCTest.java
+++ b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GetpathsegmentTopologyOperationRPCTest.java
@@ -6,6 +6,8 @@ import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.GetpathsegmentTopologyOperationInput;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.GetpathsegmentTopologyOperationOutput;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.service.information.ServiceInformationBuilder;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.onap.model.information.OnapModelInformationBuilder;
import org.opendaylight.yangtools.yang.common.RpcResult;
import static org.junit.Assert.assertEquals;
@@ -34,4 +36,18 @@ public class GetpathsegmentTopologyOperationRPCTest extends GenericResourceApiPr
assertEquals("invalid input, null or empty service-instance-id", output.getResponseMessage());
assertEquals("Y", output.getAckFinalIndicator());
}
+
+ @Test
+ public void should_fail_when_valid_vnf_topology() throws Exception {
+
+ GetpathsegmentTopologyOperationInput input = build(GetpathsegmentTopologyOperationInput()
+ .setServiceInformation(new ServiceInformationBuilder().setServiceInstanceId("ServiceInstanceID").build()));
+
+ GetpathsegmentTopologyOperationOutput output =
+ exec(genericResourceApiProvider::getpathsegmentTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("404", output.getResponseCode());
+ assertEquals("invalid input, no model-uuid provided", output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+ }
}