net.javacrumbs.smock.springws.client
Class AbstractSmockClientTest
java.lang.Object
net.javacrumbs.smock.common.client.AbstractCommonWebServiceClientTest
net.javacrumbs.smock.common.client.AbstractCommonSmockClientTest
net.javacrumbs.smock.springws.client.AbstractSmockClientTest
public abstract class AbstractSmockClientTest
- extends AbstractCommonSmockClientTest
Extends AbstractWebServiceClientTest and gives access to Smock specific methods.
- 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.AbstractCommonSmockClientTest |
fromResource, message, message, message, message, resource, setResourceLoader, setTemplateProcessor, withMessage, withMessage, withMessage |
| 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
AbstractSmockClientTest
public AbstractSmockClientTest()
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 -
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
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.