net.javacrumbs.smock.springws.client
Class AbstractWebServiceClientTest
java.lang.Object
net.javacrumbs.smock.common.client.AbstractCommonWebServiceClientTest
net.javacrumbs.smock.springws.client.AbstractWebServiceClientTest
public abstract class AbstractWebServiceClientTest
- extends AbstractCommonWebServiceClientTest
Simplifies Spring WS test usage. Can be extended by Spring WS client test. It wraps static methods from ResponseCreators, RequestMatchers and
MockWebServiceServer and exposes them for the subclass. Moreover it automatically creates MockWebServiceServer so it can be automatically used by the subclass.
- Author:
- Lukas Krecan
|
Field Summary |
protected org.springframework.ws.test.client.MockWebServiceServer |
mockWebServiceServer
|
|
Method Summary |
void |
createServer(org.springframework.context.ApplicationContext applicationContext)
Creates a MockWebServiceServer instance based on the given ApplicationContext. |
void |
createServer(org.springframework.context.ApplicationContext applicationContext,
org.springframework.ws.server.EndpointInterceptor[] interceptors)
Creates a MockWebServiceServer instance based on the given ApplicationContext. |
org.springframework.ws.test.client.ResponseActions |
expect(org.springframework.ws.test.client.RequestMatcher requestMatcher)
Records an expectation specified by the given RequestMatcher. |
protected org.springframework.ws.test.client.MockWebServiceServer |
getMockWebServiceServer()
|
protected void |
setMockWebServiceServer(org.springframework.ws.test.client.MockWebServiceServer mocWebServiceServer)
|
void |
verify()
Verifies that all expectations were met. |
| Methods inherited from class net.javacrumbs.smock.common.client.AbstractCommonWebServiceClientTest |
anything, connectionTo, connectionTo, payload, payload, soapHeader, validPayload, withClientOrSenderFault, withError, withException, withException, withMustUnderstandFault, withPayload, withPayload, withServerOrReceiverFault, withVersionMismatchFault, xpath, xpath |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mockWebServiceServer
protected org.springframework.ws.test.client.MockWebServiceServer mockWebServiceServer
AbstractWebServiceClientTest
public AbstractWebServiceClientTest()
expect
public org.springframework.ws.test.client.ResponseActions expect(org.springframework.ws.test.client.RequestMatcher requestMatcher)
- Records an expectation specified by the given
RequestMatcher. Returns a ResponseActions object
that allows for creating the response, or to set up more expectations.
- Parameters:
requestMatcher - the request matcher expected
- Returns:
- the response actions
verify
public void verify()
- Verifies that all expectations were met.
- Throws:
AssertionError - in case of unmet expectations
createServer
public void createServer(org.springframework.context.ApplicationContext applicationContext,
org.springframework.ws.server.EndpointInterceptor[] interceptors)
- Creates a
MockWebServiceServer instance based on the given ApplicationContext.
Supports interceptors that will be applied on the incomming message. Please note that acctually the interceptoes will
be added to the ClientInterceptor set on the client side. it's an ugly hack, but that's the only way to do it
without reimplementing the whole testing library. I hope it will change in next releases.
- Parameters:
applicationContext - interceptors -
createServer
public void createServer(org.springframework.context.ApplicationContext applicationContext)
- Creates a
MockWebServiceServer instance based on the given ApplicationContext.
- Parameters:
applicationContext - interceptors -
getMockWebServiceServer
protected org.springframework.ws.test.client.MockWebServiceServer getMockWebServiceServer()
setMockWebServiceServer
protected void setMockWebServiceServer(org.springframework.ws.test.client.MockWebServiceServer mocWebServiceServer)
Copyright © 2011. All Rights Reserved.