@Test
public void should_fail_when_invalid_vnf_topology() throws Exception {
- GetpathsegmentTopologyOperationInput input = build(GetpathsegmentTopologyOperationInput());
+ GetpathsegmentTopologyOperationInput input = GetpathsegmentTopologyOperationInput().build();
GetpathsegmentTopologyOperationOutput output =
exec(genericResourceApiProvider::getpathsegmentTopologyOperation, input, RpcResult::getResult);
@Test
public void should_fail_when_valid_vnf_topology() throws Exception {
- GetpathsegmentTopologyOperationInput input = build(GetpathsegmentTopologyOperationInput()
- .setServiceInformation(new ServiceInformationBuilder().setServiceInstanceId("ServiceInstanceID").build()));
+ GetpathsegmentTopologyOperationInput input = GetpathsegmentTopologyOperationInput()
+ .setServiceInformation(new ServiceInformationBuilder().setServiceInstanceId("ServiceInstanceID").build()).build();
GetpathsegmentTopologyOperationOutput output =
exec(genericResourceApiProvider::getpathsegmentTopologyOperation, input, RpcResult::getResult);
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 = GetpathsegmentTopologyOperationInput()
+ .setServiceInformation(new ServiceInformationBuilder().setServiceInstanceId("ServiceInstanceID")
+ .setOnapModelInformation(new OnapModelInformationBuilder().setModelUuid("moduleUUID").build()).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());
+ }
}