File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 3636import org .springframework .context .annotation .Configuration ;
3737import org .springframework .mock .web .MockServletContext ;
3838import org .springframework .test .web .servlet .MockMvc ;
39+ import org .springframework .test .web .servlet .setup .MockMvcBuilders ;
3940import org .springframework .web .context .support .AnnotationConfigWebApplicationContext ;
4041
4142import static org .hamcrest .CoreMatchers .containsString ;
4243import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .get ;
4344import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .content ;
4445import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .status ;
45- import static org .springframework .test .web .servlet .setup .MockMvcBuilders .webAppContextSetup ;
4646
4747/**
4848 * Integration tests for the health endpoint when Spring Security is not available.
@@ -66,7 +66,7 @@ public void healthDetailIsPresent() throws Exception {
6666 this .context .setServletContext (new MockServletContext ());
6767 this .context .register (TestConfiguration .class );
6868 this .context .refresh ();
69- MockMvc mockMvc = webAppContextSetup (this .context ).build ();
69+ MockMvc mockMvc = MockMvcBuilders . webAppContextSetup (this .context ).build ();
7070 mockMvc .perform (get ("/health" )).andExpect (status ().isOk ())
7171 .andExpect (content ().string (containsString ("\" hello\" :\" world\" " )));
7272 }
You can’t perform that action at this time.
0 commit comments