Test case added for code coverage 07/93407/1
authorprakash.e <prakash.e@huawei.com>
Tue, 13 Aug 2019 11:09:27 +0000 (16:39 +0530)
committerprakash.e <prakash.e@huawei.com>
Tue, 13 Aug 2019 11:10:46 +0000 (16:40 +0530)
Added test case with valid ServiceInstanceID
in GetpathsegmentTopologyOperation

Change-Id: I6e647d8b19ad986427ad3642926ee1d12de3ab25
Issue-ID: SDNC-840
Signed-off-by: Prakash.E <prakash.e@huawei.com>
generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GetpathsegmentTopologyOperationRPCTest.java

index 2e24204..06da74c 100644 (file)
@@ -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());
+    }
 }