org.apache.hivemind.test
Class RegexpMatcher

java.lang.Object
  |
  +--org.apache.hivemind.test.RegexpMatcher
All Implemented Interfaces:
ArgumentMatcher

public class RegexpMatcher
extends java.lang.Object
implements ArgumentMatcher

A ArgumentMatcherimplementation treates the expected value as a Perl5 Regular expression, which is matched against the actual value.

Since:
1.1
Author:
Howard Lewis Ship

Constructor Summary
RegexpMatcher()
           
 
Method Summary
 boolean matches(java.lang.Object expected, java.lang.Object actual)
          Returns true if the two objects are considered the same.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexpMatcher

public RegexpMatcher()
Method Detail

matches

public boolean matches(java.lang.Object expected,
                       java.lang.Object actual)
Description copied from interface: ArgumentMatcher
Returns true if the two objects are considered the same. This method is only invoked if both arguments are non-null and not the same object (identity comparison, not equals()).

Specified by:
matches in interface ArgumentMatcher
Parameters:
expected - The expected argument value
actual - The actual argument value