aboutsummaryrefslogtreecommitdiffstats
path: root/generic-resource-api/provider/src
diff options
context:
space:
mode:
authorprakash.e <prakash.e@huawei.com>2019-08-13 16:39:27 +0530
committerprakash.e <prakash.e@huawei.com>2019-08-13 16:40:46 +0530
commit01b9bff05de587dcc3e265972966cc14ee7a9c98 (patch)
tree0d745dc167b043e2d153f6c8d351cd607b32c2a2 /generic-resource-api/provider/src
parent469177434763abf310abf7b5d2dbbf6c19485b23 (diff)
Test case added for code coverage
Added test case with valid ServiceInstanceID in GetpathsegmentTopologyOperation Change-Id: I6e647d8b19ad986427ad3642926ee1d12de3ab25 Issue-ID: SDNC-840 Signed-off-by: Prakash.E <prakash.e@huawei.com>
Diffstat (limited to 'generic-resource-api/provider/src')
-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 2e24204a..06da74c6 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
@@ -50,4 +50,20 @@ public class GetpathsegmentTopologyOperationRPCTest extends GenericResourceApiPr
assertEquals("invalid input, no model-uuid provided", output.getResponseMessage());
assertEquals("Y", output.getAckFinalIndicator());
}
+
+ @Test
+ public void should_fail_when_valid_serice_excep_vnf_topology() throws Exception {
+
+ GetpathsegmentTopologyOperationInput input = build(GetpathsegmentTopologyOperationInput()
+ .setServiceInformation(new ServiceInformationBuilder().setServiceInstanceId("ServiceInstanceID")
+ .setOnapModelInformation(new OnapModelInformationBuilder().setModelUuid("moduleUUID").build()).build()));
+
+ GetpathsegmentTopologyOperationOutput output =
+ exec(genericResourceApiProvider::getpathsegmentTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("503", output.getResponseCode());
+ assertEquals("No service logic active for generic-resource-api: 'getpathsegment-topology-operation'",
+ output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+ }
}