X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Ftest%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Fclients%2FAsyncRestClientTest.java;h=f3b9482d629ca9c1eed7aa63ef59c3fe02a36795;hb=6a39814272307d0207222c9229b0d765ac062bf0;hp=884b36feaaa022b9abf1c5379ab9e2502a97a3b1;hpb=6a8a0d5350a77b6d1e4a8f95c0fe8fbfeef77339;p=nonrtric.git diff --git a/policy-agent/src/test/java/org/oransc/policyagent/clients/AsyncRestClientTest.java b/policy-agent/src/test/java/org/oransc/policyagent/clients/AsyncRestClientTest.java index 884b36fe..f3b9482d 100644 --- a/policy-agent/src/test/java/org/oransc/policyagent/clients/AsyncRestClientTest.java +++ b/policy-agent/src/test/java/org/oransc/policyagent/clients/AsyncRestClientTest.java @@ -39,7 +39,7 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import reactor.util.Loggers; -public class AsyncRestClientTest { +class AsyncRestClientTest { private static final String BASE_URL = "BaseUrl"; private static final String REQUEST_URL = "/test"; private static final String USERNAME = "username"; @@ -53,7 +53,7 @@ public class AsyncRestClientTest { private static AsyncRestClient clientUnderTest; @BeforeAll - public static void init() { + static void init() { // skip a lot of unnecessary logs from MockWebServer InternalLoggerFactory.setDefaultFactory(JdkLoggerFactory.INSTANCE); Loggers.useJdkLoggers(); @@ -62,12 +62,12 @@ public class AsyncRestClientTest { } @AfterAll - public static void tearDown() throws IOException { + static void tearDown() throws IOException { mockWebServer.shutdown(); } @Test - public void testGetNoError() { + void testGetNoError() { mockWebServer.enqueue(new MockResponse().setResponseCode(SUCCESS_CODE) // .setHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) // .setBody(TEST_JSON)); @@ -77,7 +77,7 @@ public class AsyncRestClientTest { } @Test - public void testGetError() { + void testGetError() { mockWebServer.enqueue(new MockResponse().setResponseCode(ERROR_CODE)); Mono returnedMono = clientUnderTest.get(REQUEST_URL); @@ -86,7 +86,7 @@ public class AsyncRestClientTest { } @Test - public void testPutNoError() { + void testPutNoError() { mockWebServer.enqueue(new MockResponse().setResponseCode(SUCCESS_CODE) // .setHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) // .setBody(TEST_JSON)); @@ -96,7 +96,7 @@ public class AsyncRestClientTest { } @Test - public void testPutError() { + void testPutError() { mockWebServer.enqueue(new MockResponse().setResponseCode(ERROR_CODE)); Mono returnedMono = clientUnderTest.put(REQUEST_URL, TEST_JSON); @@ -105,7 +105,7 @@ public class AsyncRestClientTest { } @Test - public void testDeleteNoError() { + void testDeleteNoError() { mockWebServer.enqueue(new MockResponse().setResponseCode(SUCCESS_CODE)); Mono returnedMono = clientUnderTest.delete(REQUEST_URL); @@ -113,7 +113,7 @@ public class AsyncRestClientTest { } @Test - public void testDeleteError() { + void testDeleteError() { mockWebServer.enqueue(new MockResponse().setResponseCode(ERROR_CODE)); Mono returnedMono = clientUnderTest.delete(REQUEST_URL); @@ -122,7 +122,7 @@ public class AsyncRestClientTest { } @Test - public void testPostNoError() { + void testPostNoError() { mockWebServer.enqueue(new MockResponse().setResponseCode(SUCCESS_CODE) // .setHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) // .setBody(TEST_JSON)); @@ -132,7 +132,7 @@ public class AsyncRestClientTest { } @Test - public void testPostError() { + void testPostError() { mockWebServer.enqueue(new MockResponse().setResponseCode(ERROR_CODE)); Mono returnedMono = clientUnderTest.post(REQUEST_URL, TEST_JSON); @@ -141,7 +141,7 @@ public class AsyncRestClientTest { } @Test - public void testPostWithAuthHeaderNoError() { + void testPostWithAuthHeaderNoError() { mockWebServer.enqueue(new MockResponse().setResponseCode(SUCCESS_CODE) // .setHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) // .setBody(TEST_JSON)); @@ -151,7 +151,7 @@ public class AsyncRestClientTest { } @Test - public void testPostWithAuthHeaderError() { + void testPostWithAuthHeaderError() { mockWebServer.enqueue(new MockResponse().setResponseCode(ERROR_CODE)); Mono returnedMono = clientUnderTest.postWithAuthHeader(REQUEST_URL, TEST_JSON, USERNAME, PASSWORD);