X-Git-Url: https://gerrit.onap.org/r/gitweb?p=sdnc%2Fnorthbound.git;a=blobdiff_plain;f=generic-resource-api%2Fprovider%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fsdnc%2Fnorthbound%2FServiceTopologyOperationRPCTest.java;h=faacd2205ab6be9fd9594f395c53830c78e2391d;hp=ee0bdb50e057d46079ec0fd2ab0fad42b40e52be;hb=894476cd13c0045d8ce44bf77f1729a3f44c0e10;hpb=29c3b1e0557e10b1ee4570324e85771f6db8b2c3 diff --git a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/ServiceTopologyOperationRPCTest.java b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/ServiceTopologyOperationRPCTest.java index ee0bdb50..faacd220 100644 --- a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/ServiceTopologyOperationRPCTest.java +++ b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/ServiceTopologyOperationRPCTest.java @@ -87,26 +87,30 @@ public class ServiceTopologyOperationRPCTest extends GenericResourceApiProviderT svcClient.mockExecute(svcResultProp); // create the ServiceTopologyOperationInput from the template - ServiceTopologyOperationInput serviceTopologyOperationInput = createSTOI(); + ServiceTopologyOperationInput input = createSTOI(); //execute the mdsal exec - ServiceTopologyOperationOutput actualServiceTopologyOperationOutput = exec( + ServiceTopologyOperationOutput output = exec( genericResourceApiProvider::serviceTopologyOperation - , serviceTopologyOperationInput + , input , RpcResult::getResult ); + assertEquals("200", output.getResponseCode()); + assertEquals("OK", output.getResponseMessage()); + assertEquals("Y", output.getAckFinalIndicator()); + //verify the returned ServiceTopologyOperationOutput ServiceTopologyOperationOutput expectedServiceTopologyOperationOutput = createExpectedSTOO(svcResultProp, - serviceTopologyOperationInput); - assertEquals(expectedServiceTopologyOperationOutput, actualServiceTopologyOperationOutput); + input); + assertEquals(expectedServiceTopologyOperationOutput, output); //verify the persisted Service - Service actualService = db.read(serviceTopologyOperationInput.getServiceInformation().getServiceInstanceId(), + Service actualService = db.read(input.getServiceInformation().getServiceInstanceId(), LogicalDatastoreType.CONFIGURATION); Service expectedService = createExpectedService( expectedServiceTopologyOperationOutput, - serviceTopologyOperationInput, + input, actualService); assertEquals(expectedService, actualService);