From: prakash.e Date: Tue, 13 Aug 2019 11:09:27 +0000 (+0530) Subject: Test case added for code coverage X-Git-Tag: 1.6.2~1 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=sdnc%2Fnorthbound.git;a=commitdiff_plain;h=01b9bff05de587dcc3e265972966cc14ee7a9c98;hp=469177434763abf310abf7b5d2dbbf6c19485b23 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 --- 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()); + } }