Java 类org.springframework.test.web.servlet.setup.MockMvcConfigurer 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MvcEndpointIntegrationTests.java   
private MockMvc doCreateMockMvc(MockMvcConfigurer... configurers) {
    this.context.setServletContext(new MockServletContext());
    this.context.refresh();
    DefaultMockMvcBuilder builder = MockMvcBuilders.webAppContextSetup(this.context);
    for (MockMvcConfigurer configurer : configurers) {
        builder.apply(configurer);
    }
    return builder.build();
}
项目:spring-boot-concourse    文件:MvcEndpointIntegrationTests.java   
private MockMvc doCreateMockMvc(MockMvcConfigurer... configurers) {
    this.context.setServletContext(new MockServletContext());
    this.context.refresh();
    DefaultMockMvcBuilder builder = MockMvcBuilders.webAppContextSetup(this.context);
    for (MockMvcConfigurer configurer : configurers) {
        builder.apply(configurer);
    }
    return builder.build();
}
项目:contestparser    文件:MvcEndpointIntegrationTests.java   
private MockMvc doCreateMockMvc(MockMvcConfigurer... configurers) {
    this.context.setServletContext(new MockServletContext());
    this.context.refresh();
    DefaultMockMvcBuilder builder = MockMvcBuilders.webAppContextSetup(this.context);
    for (MockMvcConfigurer configurer : configurers) {
        builder.apply(configurer);
    }
    return builder.build();
}
项目:spring4-understanding    文件:MockMvcHtmlUnitDriverBuilder.java   
protected MockMvcHtmlUnitDriverBuilder(WebApplicationContext context, MockMvcConfigurer configurer) {
    super(context, configurer);
}
项目:spring4-understanding    文件:MockMvcWebClientBuilder.java   
protected MockMvcWebClientBuilder(WebApplicationContext context, MockMvcConfigurer configurer) {
    super(context, configurer);
}
项目:spring4-understanding    文件:MockMvcHtmlUnitDriverBuilder.java   
/**
 * Create a new {@code MockMvcHtmlUnitDriverBuilder} based on the supplied
 * {@link WebApplicationContext} and {@link MockMvcConfigurer}.
 * @param context the {@code WebApplicationContext} to create a {@link MockMvc}
 * instance from; never {@code null}
 * @param configurer the {@code MockMvcConfigurer} to apply; never {@code null}
 * @return the MockMvcHtmlUnitDriverBuilder to customize
 */
public static MockMvcHtmlUnitDriverBuilder webAppContextSetup(WebApplicationContext context,
        MockMvcConfigurer configurer) {

    Assert.notNull(context, "WebApplicationContext must not be null");
    Assert.notNull(configurer, "MockMvcConfigurer must not be null");
    return new MockMvcHtmlUnitDriverBuilder(context, configurer);
}
项目:spring4-understanding    文件:MockMvcWebClientBuilder.java   
/**
 * Create a new {@code MockMvcWebClientBuilder} based on the supplied
 * {@link WebApplicationContext} and {@link MockMvcConfigurer}.
 * @param context the {@code WebApplicationContext} to create a {@link MockMvc}
 * instance from; never {@code null}
 * @param configurer the {@code MockMvcConfigurer} to apply; never {@code null}
 * @return the MockMvcWebClientBuilder to customize
 */
public static MockMvcWebClientBuilder webAppContextSetup(WebApplicationContext context, MockMvcConfigurer configurer) {
    Assert.notNull(context, "WebApplicationContext must not be null");
    Assert.notNull(configurer, "MockMvcConfigurer must not be null");
    return new MockMvcWebClientBuilder(context, configurer);
}
项目:spring4-understanding    文件:MockMvcWebConnectionBuilderSupport.java   
/**
 * Create a new instance using the supplied {@link WebApplicationContext}
 * and {@link MockMvcConfigurer}.
 * @param context the {@code WebApplicationContext} to create a {@code MockMvc}
 * instance from; never {@code null}
 * @param configurer the MockMvcConfigurer to apply; never {@code null}
 */
protected MockMvcWebConnectionBuilderSupport(WebApplicationContext context, MockMvcConfigurer configurer) {
    this(MockMvcBuilders.webAppContextSetup(context).apply(configurer).build());
}