Package org.citrusframework.validation
Class ValidationUtils
java.lang.Object
org.citrusframework.validation.ValidationUtils
Utility class provides helper methods for validation work in Citrus.
- Since:
- 1.3
- Author:
- Christoph Deppisch
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildValueMismatchErrorMessage(String baseMessage, Object controlValue, Object actualValue) Constructs proper error message with expected value and actual value.static voidvalidateValues(Object actualValue, Object expectedValue, String pathExpression, TestContext context) Validates actual against expected value of element
-
Method Details
-
validateValues
public static void validateValues(Object actualValue, Object expectedValue, String pathExpression, TestContext context) throws ValidationException Validates actual against expected value of element- Parameters:
actualValue-expectedValue-pathExpression-context-- Throws:
ValidationException- if validation fails
-
buildValueMismatchErrorMessage
public static String buildValueMismatchErrorMessage(String baseMessage, Object controlValue, Object actualValue) Constructs proper error message with expected value and actual value.- Parameters:
baseMessage- the base error message.controlValue- the expected value.actualValue- the actual value.- Returns:
-