use of org.springframework.ws.client.core.WebServiceTemplate in project spring-boot by spring-projects.
the class WebServiceTemplateBuilderTests method setCheckConnectionForFault.
@Test
void setCheckConnectionForFault() {
WebServiceTemplate template = mock(WebServiceTemplate.class);
this.builder.setCheckConnectionForFault(false).configure(template);
then(template).should().setCheckConnectionForFault(false);
}
use of org.springframework.ws.client.core.WebServiceTemplate in project spring-boot by spring-projects.
the class WebServiceTemplateBuilderTests method detectHttpMessageSenderWhenFalseShouldDisableDetection.
@Test
void detectHttpMessageSenderWhenFalseShouldDisableDetection() {
WebServiceTemplate webServiceTemplate = this.builder.detectHttpMessageSender(false).build();
assertThat(webServiceTemplate.getMessageSenders()).hasSize(1);
assertThat(webServiceTemplate.getMessageSenders()[0]).isInstanceOf(HttpUrlConnectionMessageSender.class);
}
use of org.springframework.ws.client.core.WebServiceTemplate in project spring-boot by spring-projects.
the class WebServiceTemplateBuilderTests method customizersShouldApply.
@Test
void customizersShouldApply() {
WebServiceTemplateCustomizer customizer = mock(WebServiceTemplateCustomizer.class);
WebServiceTemplate template = this.builder.customizers(customizer).build();
then(customizer).should().customize(template);
}
use of org.springframework.ws.client.core.WebServiceTemplate in project spring-boot by spring-projects.
the class WebServiceTemplateBuilderTests method interceptorsShouldReplaceExisting.
@Test
void interceptorsShouldReplaceExisting() {
WebServiceTemplate template = this.builder.interceptors(mock(ClientInterceptor.class)).interceptors(Collections.singleton(this.interceptor)).build();
assertThat(template.getInterceptors()).containsOnly(this.interceptor);
}
use of org.springframework.ws.client.core.WebServiceTemplate in project spring-boot by spring-projects.
the class WebServiceTemplateBuilderTests method createWithCustomizersShouldApplyCustomizers.
@Test
void createWithCustomizersShouldApplyCustomizers() {
WebServiceTemplateCustomizer customizer = mock(WebServiceTemplateCustomizer.class);
WebServiceTemplate template = new WebServiceTemplateBuilder(customizer).build();
then(customizer).should().customize(template);
}
Aggregations