net.sourceforge.sqlunit.matchers
Class TypelessMatcher

java.lang.Object
  extended by net.sourceforge.sqlunit.matchers.TypelessMatcher
All Implemented Interfaces:
IMatcher

public class TypelessMatcher
extends java.lang.Object
implements IMatcher

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.

Version:
$Revision: 1.4 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Constructor Summary
TypelessMatcher()
          Default constructor as per contract with IMatcher.
 
Method Summary
 boolean isEqual(java.lang.String source, java.lang.String target, java.util.Map args)
          Returns true if the String values of the source and target are equal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypelessMatcher

public TypelessMatcher()
Default constructor as per contract with IMatcher.

Method Detail

isEqual

public final boolean isEqual(java.lang.String source,
                             java.lang.String target,
                             java.util.Map args)
                      throws SQLUnitException
Returns true if the String values of the source and target are equal.

Specified by:
isEqual in interface IMatcher
Parameters:
source - the String representing the source to be matched.
target - the String representing the target to be matched.
args - a Map of name value pairs of arguments passed in.
Returns:
true if the matching strategy resulted in success.
Throws:
SQLUnitException - if there was a problem with matching.