|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.consol.citrus.validation.AbstractMessageValidator<ControlMessageValidationContext>
com.consol.citrus.validation.ControlMessageValidator
public class ControlMessageValidator
Basic control message validator provides message header validation. Subclasses only have to add specific logic for message payload validation. This validator is based on a control message.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
log
Logger |
| Constructor Summary | |
|---|---|
ControlMessageValidator()
|
|
| Method Summary | |
|---|---|
ControlMessageValidationContext |
findValidationContext(List<ValidationContext> validationContexts)
Construct a proper validation context for this validator. |
boolean |
supportsMessageType(String messageType)
Checks if the message type is supported. |
void |
validateMessage(org.springframework.integration.Message<?> receivedMessage,
TestContext context,
ControlMessageValidationContext validationContext)
Implementation performs message header validation as well as message payload validation. |
void |
validateMessageHeader(org.springframework.integration.MessageHeaders controlHeaders,
org.springframework.integration.MessageHeaders receivedHeaders,
TestContext context)
Validates the message header comparing its values to a control header set. |
void |
validateMessagePayload(org.springframework.integration.Message<?> receivedMessage,
org.springframework.integration.Message<?> controlMessage,
TestContext context)
Validates the message payload with comparison to the control message payload located in validation context. |
| Methods inherited from class com.consol.citrus.validation.AbstractMessageValidator |
|---|
validateMessage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger log
| Constructor Detail |
|---|
public ControlMessageValidator()
| Method Detail |
|---|
public void validateMessage(org.springframework.integration.Message<?> receivedMessage,
TestContext context,
ControlMessageValidationContext validationContext)
receivedMessage - the message to validate.context - the current test contextvalidationContext - the proper validation context.
public void validateMessagePayload(org.springframework.integration.Message<?> receivedMessage,
org.springframework.integration.Message<?> controlMessage,
TestContext context)
throws ValidationException
receivedMessage - the received message to check.validationContext - the current validation context holding the expected control message.context - the current test context with all variables.
ValidationException
public void validateMessageHeader(org.springframework.integration.MessageHeaders controlHeaders,
org.springframework.integration.MessageHeaders receivedHeaders,
TestContext context)
controlHeaders - the expected control headers.receivedHeaders - the actual headers from message received.context - the current test context.public ControlMessageValidationContext findValidationContext(List<ValidationContext> validationContexts)
ControlMessageValidationContext.
public boolean supportsMessageType(String messageType)
messageType - the message type representation as String (e.g. xml, json, csv, plaintext).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||