net.javacrumbs.smock.common.server
Class CommonSmockServer

java.lang.Object
  extended by net.javacrumbs.smock.common.SmockCommon
      extended by net.javacrumbs.smock.common.server.CommonSmockServer
Direct Known Subclasses:
ServerTestHelper

public class CommonSmockServer
extends SmockCommon

Adds extra functionality to Spring WS server test support.

Author:
Lukas Krecan

Constructor Summary
CommonSmockServer()
           
 
Method Summary
static ParametrizableResponseMatcher message(Document message)
          Expects the given message.
static ParametrizableResponseMatcher message(org.springframework.core.io.Resource messageResource)
          Expects the given message.
static ParametrizableResponseMatcher message(Source content)
          Expects the given message.
static ParametrizableResponseMatcher message(String messageResource)
          Expects the given message.
static ParametrizableRequestCreator withMessage(Document message)
          Create a request with the given Resource XML as content.
static ParametrizableRequestCreator withMessage(org.springframework.core.io.Resource messageResource)
          Create a request with the given Resource as content.
static ParametrizableRequestCreator withMessage(Source message)
          Create a request with the given Resource XML as content.
static ParametrizableRequestCreator withMessage(String messageResource)
          Create a request with the given resource as content.
 
Methods inherited from class net.javacrumbs.smock.common.SmockCommon
createMessageFactory, createMessageFactory, createMessageFactory, createSource, fromResource, getResourceLoader, getTemplateProcessor, loadDocument, resource, setResourceLoader, setTemplateProcessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonSmockServer

public CommonSmockServer()
Method Detail

withMessage

public static ParametrizableRequestCreator withMessage(String messageResource)
Create a request with the given resource as content. If the content is payload it will be wrapped into a SOAP, if the content contains the whole message, it will be used as it is. Supports templates that will be resolved by TemplateProcessor.

Parameters:
messageResource - the message content
Returns:
the request creator

withMessage

public static ParametrizableRequestCreator withMessage(org.springframework.core.io.Resource messageResource)
Create a request with the given Resource as content. If the content is payload it will be wrapped into a SOAP, if the content contains the whole message, it will be used as it is. Supports templates that will be resolved by TemplateProcessor.

Parameters:
messageResource -
Returns:
the request creator

withMessage

public static ParametrizableRequestCreator withMessage(Source message)
Create a request with the given Resource XML as content. If the content is payload it will be wrapped into a SOAP, if the content contains the whole message, it will be used as it is. Supports templates that will be resolved by TemplateProcessor.

Parameters:
message -
Returns:
the request creator

withMessage

public static ParametrizableRequestCreator withMessage(Document message)
Create a request with the given Resource XML as content. If the content is payload it will be wrapped into a SOAP, if the content contains the whole message, it will be used as it is. Supports templates that will be resolved by TemplateProcessor.

Parameters:
message -
Returns:

message

public static ParametrizableResponseMatcher message(String messageResource)
Expects the given message. If the message contains only payload, only the payloads will be compared. If it contains whole message, whole messages will be compared. Control message can be preprocessed by TemplateProcessor.

Parameters:
messageResource -
Returns:

message

public static ParametrizableResponseMatcher message(org.springframework.core.io.Resource messageResource)
Expects the given message. If the message contains only payload, only the payloads will be compared. If it contains whole message, whole messages will be compared. Control message can be preprocessed by TemplateProcessor.

Parameters:
messageResource -
Returns:

message

public static ParametrizableResponseMatcher message(Source content)
Expects the given message. If the message contains only payload, only the payloads will be compared. If it contains whole message, whole messages will be compared. Control message can be preprocessed by TemplateProcessor.

Parameters:
content -
Returns:

message

public static ParametrizableResponseMatcher message(Document message)
Expects the given message. If the message contains only payload, only the payloads will be compared. If it contains whole message, whole messages will be compared. Control message can be preprocessed by TemplateProcessor.

Parameters:
message -
Returns:


Copyright © 2011. All Rights Reserved.