List of currently supported Matchers

Table 2. SQLUnit Matchers

Matcher NameAuthorDescriptionArguments
AllOrNothingMatcherSujit Pal (spal@users.sourceforge.net)The AllOrNothingMatcher is an implementation of the IMatcher interface used to define rulesets for matching columns in SQLUnit. This implementation is of no particular use, except as a template for other useful matchers and for testing. Based on the argument supplied to it via the argument map, it will either always returns true or false for the column being matched.

match : Always returns true if set to true, else always returns false.

TypelessMatcherSujit Pal (spal@users.sourceforge.net)The TypelessMatcher matches column values only from two different SQL or stored procedure calls. This would be useful when the data returned from two different databases may have the same String value but the actual datatypes they are implemented as may be different. This is the matcher that is used implicitly when the assertion "resultset-values-equal" is called.

None : -

RangeMatcherSujit Pal (spal@users.sourceforge.net)The RangeMatcher is an implementation of the IMatcher interface used to define rulesets for matching columns in SQLUnit. This matcher will accept an absolute tolerance value and check to see that the target is within (+/-) tolerance of the source.

tolerance : An absolute tolerance value.

PercentageRangeMatcherSujit Pal (spal@users.sourceforge.net)The PercentageRangeMatcher is an implementation of the IMatcher interface used to define rulesets for matching columns in SQLUnit. This matcher will accept a percentage tolerance value and check to see that the target is within (+/-) tolerance percent of the source.

pc-tolerance : A percentage tolerance value.

TypelessPercentageMatcherChris Watts (c_watts@users.sourceforge.net)The TypelessPercentageMatcher matches columns which may differ by a specified percentage. This can be useful when comparing numeric values across data types which have different default precisions.

pc-tolerance : A percentage tolerance value.