Java Code Examples for org.springframework.test.web.servlet.setup.MockMvcBuilders#webAppContextSetup()
The following examples show how to use
org.springframework.test.web.servlet.setup.MockMvcBuilders#webAppContextSetup() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractMvcIntegrationTest.java From opencensus-java with Apache License 2.0 | 5 votes |
@Before public void setup() { InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); viewResolver.setPrefix("/WEB-INF/jsp/view/"); viewResolver.setSuffix(".jsp"); DefaultMockMvcBuilder mockMvcBuilder = MockMvcBuilders.webAppContextSetup(this.webApplicationContext); configureMockMvcBuilder(mockMvcBuilder); this.mockMvc = mockMvcBuilder.build(); }
Example 2
Source File: AbstractMvcIntegrationTest.java From spring-cloud-sleuth with Apache License 2.0 | 5 votes |
@BeforeEach public void setup() { DefaultMockMvcBuilder mockMvcBuilder = MockMvcBuilders .webAppContextSetup(this.webApplicationContext); configureMockMvcBuilder(mockMvcBuilder); this.mockMvc = mockMvcBuilder.build(); }
Example 3
Source File: GroupsAndUserTest.java From Insights with Apache License 2.0 | 4 votes |
private MockMvc getMacMvc() { DefaultMockMvcBuilder builder = MockMvcBuilders.webAppContextSetup(this.wac); return builder.build(); }
Example 4
Source File: SpringBootWrapper.java From funcatron with Apache License 2.0 | 4 votes |
protected MockMvc getMockMvc() { DefaultMockMvcBuilder builder = MockMvcBuilders.webAppContextSetup(applicationContext); return builder.build(); }