File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed
src/test/java/com/somemore/support Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change 11package com .somemore .support ;
22
33
4- import static org .springframework .test .web .servlet .result .MockMvcResultHandlers .print ;
5-
64import com .fasterxml .jackson .databind .ObjectMapper ;
7- import org .junit .jupiter .api .BeforeEach ;
85import org .springframework .beans .factory .annotation .Autowired ;
96import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
107import org .springframework .boot .test .context .SpringBootTest ;
118import org .springframework .test .context .ActiveProfiles ;
129import org .springframework .test .web .servlet .MockMvc ;
13- import org .springframework .test .web .servlet .setup .MockMvcBuilders ;
14- import org .springframework .web .context .WebApplicationContext ;
15- import org .springframework .web .filter .CharacterEncodingFilter ;
1610
1711@ ActiveProfiles ("test" )
1812@ SpringBootTest
@@ -22,17 +16,7 @@ public abstract class ControllerTestSupport {
2216 @ Autowired
2317 protected MockMvc mockMvc ;
2418
25- @ Autowired
26- private WebApplicationContext ctx ;
27-
2819 @ Autowired
2920 protected ObjectMapper objectMapper ;
3021
31- @ BeforeEach
32- public void setup () {
33- this .mockMvc = MockMvcBuilders .webAppContextSetup (ctx )
34- .addFilters (new CharacterEncodingFilter ("UTF-8" , true ))
35- .alwaysDo (print ())
36- .build ();
37- }
3822}
You can’t perform that action at this time.
0 commit comments