Package org.appng.testsupport.validation
Class DateFieldDifferenceHandler
- java.lang.Object
-
- org.appng.testsupport.validation.DifferenceHandler
-
- org.appng.testsupport.validation.DateFieldDifferenceHandler
-
- All Implemented Interfaces:
DifferenceListener
public class DateFieldDifferenceHandler extends DifferenceHandler
ADateFieldDifferenceHandler
that ignores theDifference
in the value of aDatafield
of typeFieldType.DATE
. Useful if aDatasource
contains dates that vary during test-execution, like the creation-date of an entity.
For example, the following nodes would be considered as identical:<field name="creationDate" type="date"> <value>2013-10-22</value> </field>
and<field name="creationDate" type="date"> <value>2012-09-21</value> </field>
NoteDateFieldDifferenceHandler
is getting applied to the whole document, ignoring everyDifference
in the value of anyDatafield
s of typeFieldType.DATE
. If a more precise distinction is required, useXPathDifferenceHandler
instead.- Author:
- Matthias Müller
-
-
Field Summary
-
Fields inherited from interface org.custommonkey.xmlunit.DifferenceListener
RETURN_ACCEPT_DIFFERENCE, RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL, RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR, RETURN_UPGRADE_DIFFERENCE_NODES_DIFFERENT
-
-
Constructor Summary
Constructors Constructor Description DateFieldDifferenceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
differenceFound(Difference difference)
-
Methods inherited from class org.appng.testsupport.validation.DifferenceHandler
skippedComparison
-
-
-
-
Method Detail
-
differenceFound
public int differenceFound(Difference difference)
- Specified by:
differenceFound
in interfaceDifferenceListener
- Specified by:
differenceFound
in classDifferenceHandler
-
-