Class JsonPathMessageValidationContext
- java.lang.Object
-
- com.consol.citrus.validation.context.DefaultValidationContext
-
- com.consol.citrus.validation.json.JsonPathMessageValidationContext
-
- All Implemented Interfaces:
com.consol.citrus.validation.context.ValidationContext
public class JsonPathMessageValidationContext extends com.consol.citrus.validation.context.DefaultValidationContext
Specialised validation context adds JSON path expressions for message validation.- Since:
- 2.3
- Author:
- Christoph Deppisch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JsonPathMessageValidationContext.Builder
Fluent builder.
-
Constructor Summary
Constructors Constructor Description JsonPathMessageValidationContext()
Default constructor.JsonPathMessageValidationContext(JsonPathMessageValidationContext.Builder builder)
Constructor using fluent builder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getJsonPathExpressions()
Get the control message elements that have to be present in the received message.static boolean
isJsonPathExpression(String pathExpression)
Check whether given path expression is a JSONPath expression.
-
-
-
Constructor Detail
-
JsonPathMessageValidationContext
public JsonPathMessageValidationContext(JsonPathMessageValidationContext.Builder builder)
Constructor using fluent builder.- Parameters:
builder
-
-
JsonPathMessageValidationContext
public JsonPathMessageValidationContext()
Default constructor.
-
-
Method Detail
-
getJsonPathExpressions
public Map<String,Object> getJsonPathExpressions()
Get the control message elements that have to be present in the received message. Message element values are compared as well.- Returns:
- the jsonPathExpressions
-
isJsonPathExpression
public static boolean isJsonPathExpression(String pathExpression)
Check whether given path expression is a JSONPath expression.- Parameters:
pathExpression
-- Returns:
-
-