net.javacrumbs.smock.common
Class TemplateAwareMessageMatcher

java.lang.Object
  extended by net.javacrumbs.smock.common.MessageMatcher
      extended by net.javacrumbs.smock.common.TemplateAwareMessageMatcher
All Implemented Interfaces:
ParametrizableRequestMatcher, ParametrizableResponseMatcher, org.springframework.ws.test.client.RequestMatcher, org.springframework.ws.test.server.ResponseMatcher

public class TemplateAwareMessageMatcher
extends MessageMatcher
implements ParametrizableResponseMatcher, ParametrizableRequestMatcher

MessageCompareMatcher that processes template before comparison.

Author:
Lukas Krecan

Field Summary
 
Fields inherited from class net.javacrumbs.smock.common.MessageMatcher
controlMessage
 
Constructor Summary
TemplateAwareMessageMatcher(Source controlMessage, Map<String,Object> parameters, TemplateProcessor templateProcessor)
           
 
Method Summary
protected  Source preprocessControlMessage(org.springframework.ws.WebServiceMessage input)
          Does control message pre-processing.
 TemplateAwareMessageMatcher withParameter(String name, Object value)
          Adds parameter to the ResponseMatcher
 TemplateAwareMessageMatcher withParameters(Map<String,Object> additionalParameters)
          Adds parameters to the ResponseMatcher
 
Methods inherited from class net.javacrumbs.smock.common.MessageMatcher
compare, createDiff, getControlMessage, match, match, matchInternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.ws.test.server.ResponseMatcher
match
 
Methods inherited from interface org.springframework.ws.test.client.RequestMatcher
match
 

Constructor Detail

TemplateAwareMessageMatcher

public TemplateAwareMessageMatcher(Source controlMessage,
                                   Map<String,Object> parameters,
                                   TemplateProcessor templateProcessor)
Method Detail

preprocessControlMessage

protected Source preprocessControlMessage(org.springframework.ws.WebServiceMessage input)
Description copied from class: MessageMatcher
Does control message pre-processing. Can be overriden.

Overrides:
preprocessControlMessage in class MessageMatcher
Returns:

withParameter

public TemplateAwareMessageMatcher withParameter(String name,
                                                 Object value)
Description copied from interface: ParametrizableResponseMatcher
Adds parameter to the ResponseMatcher

Specified by:
withParameter in interface ParametrizableRequestMatcher
Specified by:
withParameter in interface ParametrizableResponseMatcher
Returns:

withParameters

public TemplateAwareMessageMatcher withParameters(Map<String,Object> additionalParameters)
Description copied from interface: ParametrizableResponseMatcher
Adds parameters to the ResponseMatcher

Specified by:
withParameters in interface ParametrizableRequestMatcher
Specified by:
withParameters in interface ParametrizableResponseMatcher
Returns:


Copyright © 2011. All Rights Reserved.