diff options
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/mso/rest')
3 files changed, 14 insertions, 4 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java index 65cfcc18d..f89eae25e 100644 --- a/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java @@ -53,6 +53,7 @@ import org.onap.vid.mso.MsoProperties; import org.onap.vid.mso.MsoResponseWrapper; import org.onap.vid.mso.MsoResponseWrapperInterface; import org.onap.vid.mso.RestObject; +import org.onap.vid.utils.Logging; import org.onap.vid.utils.SystemPropertiesWrapper; import org.springframework.test.context.ContextConfiguration; @@ -410,7 +411,7 @@ public class MsoRestClientNewTest { String sourceId = ""; String endpoint = ""; final SyncRestClient client = mock(SyncRestClient.class); - MsoRestClientNew testSubject = new MsoRestClientNew(client, "", null, new SystemPropertiesWrapper()); + MsoRestClientNew testSubject = new MsoRestClientNew(client, "", null, new SystemPropertiesWrapper(), mock(Logging.class)); // setup final HttpResponse<String> response = mock(HttpResponse.class); @@ -474,10 +475,11 @@ public class MsoRestClientNewTest { private MsoRestClientNew msoRestClient() { final WebConfig webConfig = new WebConfig(); - return new MsoRestClientNew(new SyncRestClient(webConfig.unirestFasterxmlObjectMapper(new ObjectMapper())), baseUrl(), null, new SystemPropertiesWrapper()); + return new MsoRestClientNew(new SyncRestClient(webConfig.unirestFasterxmlObjectMapper(new ObjectMapper()), mock(Logging.class)), + baseUrl(), null, new SystemPropertiesWrapper(), mock(Logging.class)); } private MsoRestClientNew createTestSubject() { - return new MsoRestClientNew(null, "", null, new SystemPropertiesWrapper()); + return new MsoRestClientNew(null, "", null, new SystemPropertiesWrapper(), mock(Logging.class)); } } diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientTest.java index 78982ef24..5486becad 100644 --- a/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientTest.java @@ -64,6 +64,7 @@ import org.onap.vid.mso.MsoResponseWrapperInterface; import org.onap.vid.mso.MsoUtil; import org.onap.vid.mso.RestObject; import org.onap.vid.mso.model.RequestReferences; +import org.onap.vid.utils.Logging; import org.onap.vid.utils.SystemPropertiesWrapper; import org.springframework.http.HttpMethod; import org.springframework.test.context.ContextConfiguration; @@ -87,6 +88,9 @@ public class MsoRestClientTest { @Mock private SystemPropertiesWrapper systemProperties; + @Mock + private Logging loggingService; + private MsoRestClientNew restClient; @@ -95,7 +99,7 @@ public class MsoRestClientTest { initMocks(this); when(systemProperties.getProperty(MsoProperties.MSO_PASSWORD)).thenReturn("OBF:1ghz1kfx1j1w1m7w1i271e8q1eas1hzj1m4i1iyy1kch1gdz"); when(systemProperties.getProperty("app_display_name")).thenReturn("vid"); - restClient = new MsoRestClientNew(client,baseUrl,null,systemProperties); + restClient = new MsoRestClientNew(client,baseUrl,null,systemProperties,loggingService); } @Test diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/OutgoingRequestHeadersTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/OutgoingRequestHeadersTest.java index b70ba063f..20a05e334 100644 --- a/vid-app-common/src/test/java/org/onap/vid/mso/rest/OutgoingRequestHeadersTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/OutgoingRequestHeadersTest.java @@ -52,6 +52,7 @@ import org.onap.vid.aai.util.ServletRequestHelper; import org.onap.vid.aai.util.SystemPropertyHelper; import org.onap.vid.controller.filter.PromiseEcompRequestIdFilter; import org.onap.vid.testUtils.TestUtils; +import org.onap.vid.utils.Logging; import org.onap.vid.utils.Unchecked; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.web.context.request.RequestContextHolder; @@ -74,6 +75,9 @@ public class OutgoingRequestHeadersTest { @Mock private ServletRequestHelper servletRequestHelper; + @Mock + private Logging loggingService; + @InjectMocks private AAIRestInterface aaiRestInterface; |