Java 类org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MockRestServiceServerAutoConfiguration.java   
@Bean
public MockRestServiceServer mockRestServiceServer(
        MockServerRestTemplateCustomizer customizer) {
    try {
        return createDeferredMockRestServiceServer(customizer);
    }
    catch (Exception ex) {
        throw new IllegalStateException(ex);
    }
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MockRestServiceServerAutoConfiguration.java   
private MockRestServiceServer createDeferredMockRestServiceServer(
        MockServerRestTemplateCustomizer customizer) throws Exception {
    Constructor<MockRestServiceServer> constructor = MockRestServiceServer.class
            .getDeclaredConstructor(RequestExpectationManager.class);
    constructor.setAccessible(true);
    return constructor.newInstance(new DeferredRequestExpectationManager(customizer));
}
项目:spring-boot-concourse    文件:MockRestServiceServerAutoConfiguration.java   
@Bean
public MockRestServiceServer mockRestServiceServer(
        MockServerRestTemplateCustomizer customizer) {
    try {
        return createDeferredMockRestServiceServer(customizer);
    }
    catch (Exception ex) {
        throw new IllegalStateException(ex);
    }
}
项目:spring-boot-concourse    文件:MockRestServiceServerAutoConfiguration.java   
private MockRestServiceServer createDeferredMockRestServiceServer(
        MockServerRestTemplateCustomizer customizer) throws Exception {
    Constructor<MockRestServiceServer> constructor = MockRestServiceServer.class
            .getDeclaredConstructor(RequestExpectationManager.class);
    constructor.setAccessible(true);
    return constructor.newInstance(new DeferredRequestExpectationManager(customizer));
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MockRestServiceServerAutoConfiguration.java   
@Bean
public MockServerRestTemplateCustomizer mockServerRestTemplateCustomizer() {
    return new MockServerRestTemplateCustomizer();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MockRestServiceServerAutoConfiguration.java   
DeferredRequestExpectationManager(MockServerRestTemplateCustomizer customizer) {
    this.customizer = customizer;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:AutoConfigureMockRestServiceServerEnabledFalseIntegrationTests.java   
@Test(expected = NoSuchBeanDefinitionException.class)
public void mockServerRestTemplateCustomizerShouldNotBeRegistered() throws Exception {
    this.applicationContext.getBean(MockServerRestTemplateCustomizer.class);
}
项目:spring-boot-concourse    文件:MockRestServiceServerAutoConfiguration.java   
@Bean
public MockServerRestTemplateCustomizer mockServerRestTemplateCustomizer() {
    return new MockServerRestTemplateCustomizer();
}
项目:spring-boot-concourse    文件:MockRestServiceServerAutoConfiguration.java   
DeferredRequestExpectationManager(MockServerRestTemplateCustomizer customizer) {
    this.customizer = customizer;
}
项目:spring-boot-concourse    文件:AutoConfigureMockRestServiceServerEnabledFalseIntegrationTests.java   
@Test(expected = NoSuchBeanDefinitionException.class)
public void mockServerRestTemplateCustomizerShouldNotBeRegistered() throws Exception {
    this.applicationContext.getBean(MockServerRestTemplateCustomizer.class);
}