From e6a449b55674360c33879a84bbe3e4ba4460bdce Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Thu, 21 Nov 2024 17:24:26 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20test=20code=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/test/java/ApiWebClientTest.java | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 mens-batch/src/test/java/ApiWebClientTest.java diff --git a/mens-batch/src/test/java/ApiWebClientTest.java b/mens-batch/src/test/java/ApiWebClientTest.java deleted file mode 100644 index 5589e01..0000000 --- a/mens-batch/src/test/java/ApiWebClientTest.java +++ /dev/null @@ -1,31 +0,0 @@ -import static org.assertj.core.api.Assertions.*; -import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.*; - -import org.junit.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.client.AutoConfigureWebClient; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.http.HttpMethod; -import org.springframework.test.web.reactive.server.WebTestClient; - - -@AutoConfigureWebClient -@SpringBootTest(webEnvironment = RANDOM_PORT) -public class ApiWebClientTest { - - @Autowired - WebTestClient webTestClient; - - @Test - public void helloWebClient() { - webTestClient.method(HttpMethod.GET) - .uri("/hello") - .exchange() - .expectStatus().isOk() // 응답 코드 기대값 - .expectBody(String.class) // 응답 body 클래스 타입 기대값 - .value(response -> { // 응답 바디 response - System.out.println("response = " + response); - assertThat(response).isEqualToIgnoringCase("Hello World"); - }); - } -}