From 86617e56193f1773df25425a0f0ba712d92a58e4 Mon Sep 17 00:00:00 2001 From: 0-wook Date: Mon, 19 Feb 2024 10:48:47 +0900 Subject: [PATCH] update --- .../kr/co/automl/HelloControllerTest.java | 35 ++++++++----------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/app/admin-server/src/test/java/kr/co/automl/HelloControllerTest.java b/app/admin-server/src/test/java/kr/co/automl/HelloControllerTest.java index 0b20592a..611f1290 100644 --- a/app/admin-server/src/test/java/kr/co/automl/HelloControllerTest.java +++ b/app/admin-server/src/test/java/kr/co/automl/HelloControllerTest.java @@ -15,30 +15,23 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@WebMvcTest( - controllers = HelloController.class, - excludeFilters = { - @ComponentScan.Filter( - type = FilterType.ASSIGNABLE_TYPE, - classes = SecurityConfig.class - ) - } -) +@WebMvcTest(controllers = HelloController.class, excludeFilters = { + @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = SecurityConfig.class) +}) @AutoConfigureMockMvc class HelloControllerTest { - @Autowired - private MockMvc mockMvc; + @Autowired + private MockMvc mockMvc; - @Test - @WithMockUser - void hello() throws Exception { - ResultActions action = mockMvc.perform( - get("/hello") - ); + @Test + @WithMockUser + void hello() throws Exception { + ResultActions action = mockMvc.perform( + get("/hello")); - action - .andExpect(status().isOk()) - .andExpect(content().string("Hello, World!")); - } + action + .andExpect(status().isOk()) + .andExpect(content().string("Hello, World!")); + } }