diff options
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test/java')
2 files changed, 7 insertions, 7 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequestTest.java index 1e755419be..7f5f0dc931 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequestTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequestTest.java @@ -21,6 +21,7 @@ package org.onap.so.apihandlerinfra; import static com.shazam.shazamcrest.MatcherAssert.assertThat; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; +import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyString; @@ -30,7 +31,6 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static org.junit.Assert.assertEquals; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; @@ -56,10 +56,10 @@ import org.onap.so.constants.Status; import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.serviceinstancebeans.ModelInfo; +import org.onap.so.serviceinstancebeans.ModelType; import org.onap.so.serviceinstancebeans.ServiceInstancesRequest; import org.springframework.web.client.HttpClientErrorException; import com.fasterxml.jackson.databind.ObjectMapper; -import org.onap.so.serviceinstancebeans.ModelType; @RunWith(MockitoJUnitRunner.class) public class ResumeOrchestrationRequestTest { @@ -258,7 +258,7 @@ public class ResumeOrchestrationRequestTest { when(requestHandler.convertJsonToServiceInstanceRequest(anyString(), any(Actions.class), anyString(), anyString())).thenReturn(sir); when(serviceInstances.getPnfCorrelationId(any(ServiceInstancesRequest.class))).thenReturn("pnfCorrelationId"); - doReturn(lookupResult).when(serviceInstances).getServiceInstanceOrchestrationURI(sir, action, aLaCarte, + doReturn(lookupResult).when(requestHandler).getServiceInstanceOrchestrationURI(sir, action, aLaCarte, currentActiveRequest); doReturn(requestClientParameter).when(resumeReq).setRequestClientParameter(lookupResult, version, infraActiveRequest, currentActiveRequest, "pnfCorrelationId", aLaCarte, sir); @@ -311,7 +311,7 @@ public class ResumeOrchestrationRequestTest { anyString())).thenReturn(sirNullALaCarte); when(serviceInstances.getPnfCorrelationId(any(ServiceInstancesRequest.class))).thenReturn("pnfCorrelationId"); doReturn(false).when(msoRequest).getAlacarteFlag(sirNullALaCarte); - doReturn(lookupResult).when(serviceInstances).getServiceInstanceOrchestrationURI(sirNullALaCarte, action, false, + doReturn(lookupResult).when(requestHandler).getServiceInstanceOrchestrationURI(sirNullALaCarte, action, false, currentActiveRequest); doReturn(requestClientParameter).when(resumeReq).setRequestClientParameter(lookupResult, version, infraActiveRequest, currentActiveRequest, "pnfCorrelationId", aLaCarte, sirNullALaCarte); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java index 94436d54b0..61654d18e4 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java @@ -2266,7 +2266,7 @@ public class ServiceInstancesTest extends BaseTest { RequestParameters requestParameters = request.getRequestDetails().getRequestParameters(); String userParamsTxt = inputStream("/userParams.txt"); - List<Map<String, Object>> userParams = servInstances.configureUserParams(requestParameters); + List<Map<String, Object>> userParams = requestHandlerUtils.configureUserParams(requestParameters); System.out.println(userParams); assertTrue(userParams.size() > 0); assertTrue(userParams.get(0).containsKey("name")); @@ -2280,7 +2280,7 @@ public class ServiceInstancesTest extends BaseTest { ServiceInstancesRequest request = mapper.readValue(inputStream("/MacroServiceInstance.json"), ServiceInstancesRequest.class); CloudConfiguration cloudConfig = - servInstances.configureCloudConfig(request.getRequestDetails().getRequestParameters()); + requestHandlerUtils.configureCloudConfig(request.getRequestDetails().getRequestParameters()); assertEquals("mdt25b", cloudConfig.getLcpCloudRegionId()); assertEquals("aefb697db6524ddebfe4915591b0a347", cloudConfig.getTenantId()); @@ -2293,7 +2293,7 @@ public class ServiceInstancesTest extends BaseTest { mapper.readValue(inputStream("/MacroServiceInstance.json"), ServiceInstancesRequest.class); ServiceInstancesRequest expected = mapper.readValue(inputStream("/LegacyMacroServiceInstance.json"), ServiceInstancesRequest.class); - servInstances.mapToLegacyRequest(request.getRequestDetails()); + requestHandlerUtils.mapToLegacyRequest(request.getRequestDetails()); System.out.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(request)); assertThat(request, sameBeanAs(expected)); } |