Class DateRangeValidationMatcher
- java.lang.Object
-
- com.consol.citrus.validation.matcher.core.DateRangeValidationMatcher
-
- All Implemented Interfaces:
com.consol.citrus.validation.matcher.ValidationMatcher
public class DateRangeValidationMatcher extends Object implements com.consol.citrus.validation.matcher.ValidationMatcher
Validation matcher for verifying a date is within the specified range. The following check is made when performing the validation:
from-date >= date-to-validate <= to-date- Since:
- 2.5
- Author:
- Martin Maher
-
-
Constructor Summary
Constructors Constructor Description DateRangeValidationMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Calendar
toCalender(String date, String datePattern)
Converts the supplied date to it's calendar representation.void
validate(String fieldName, String value, List<String> params, com.consol.citrus.context.TestContext context)
-
-
-
Method Detail
-
validate
public void validate(String fieldName, String value, List<String> params, com.consol.citrus.context.TestContext context) throws com.consol.citrus.exceptions.ValidationException
- Specified by:
validate
in interfacecom.consol.citrus.validation.matcher.ValidationMatcher
- Throws:
com.consol.citrus.exceptions.ValidationException
-
toCalender
protected Calendar toCalender(String date, String datePattern)
Converts the supplied date to it's calendar representation. ThedatePattern
is used for parsing the date.- Parameters:
date
- the date to parsedatePattern
- the date format to use when parsing the date- Returns:
- the calendar representation
-
-