use of org.springframework.ws.client.core.WebServiceTemplate in project spring-boot by spring-projects.
the class WebServiceTemplateBuilderTests method additionalMessageSendersShouldKeepDetectedHttpMessageSender.
@Test
void additionalMessageSendersShouldKeepDetectedHttpMessageSender() {
WebServiceTemplate template = this.builder.additionalMessageSenders(this.messageSender).build();
assertThat(template.getMessageSenders()).contains(this.messageSender);
assertThat(template.getMessageSenders()).hasSize(2);
}
use of org.springframework.ws.client.core.WebServiceTemplate in project spring-boot by spring-projects.
the class WebServiceTemplateBuilderTests method buildShouldDetectHttpMessageSender.
@Test
void buildShouldDetectHttpMessageSender() {
WebServiceTemplate webServiceTemplate = this.builder.build();
assertThat(webServiceTemplate.getMessageSenders()).hasSize(1);
WebServiceMessageSender messageSender = webServiceTemplate.getMessageSenders()[0];
assertHttpComponentsRequestFactory(messageSender);
}
use of org.springframework.ws.client.core.WebServiceTemplate in project spring-boot by spring-projects.
the class WebServiceTemplateBuilderTests method setWebServiceMessageFactory.
@Test
void setWebServiceMessageFactory() {
WebServiceMessageFactory messageFactory = mock(WebServiceMessageFactory.class);
WebServiceTemplate template = this.builder.setWebServiceMessageFactory(messageFactory).build();
assertThat(template.getMessageFactory()).isEqualTo(messageFactory);
}
use of org.springframework.ws.client.core.WebServiceTemplate in project spring-boot by spring-projects.
the class WebServiceTemplateBuilderTests method additionalInterceptorsShouldAddToExisting.
@Test
void additionalInterceptorsShouldAddToExisting() {
ClientInterceptor interceptor = mock(ClientInterceptor.class);
WebServiceTemplate template = this.builder.interceptors(interceptor).additionalInterceptors(this.interceptor).build();
assertThat(template.getInterceptors()).containsOnly(interceptor, this.interceptor);
}
use of org.springframework.ws.client.core.WebServiceTemplate in project spring-boot by spring-projects.
the class WebServiceTemplateBuilderTests method setDefaultUri.
@Test
void setDefaultUri() {
URI uri = URI.create("http://localhost:8080");
WebServiceTemplate webServiceTemplate = this.builder.setDefaultUri(uri.toString()).build();
assertThat(webServiceTemplate.getDestinationProvider().getDestination()).isEqualTo(uri);
}
Aggregations