org.virtualmock.matcher
Interface ArgMatcher

All Known Implementing Classes:
AlwaysMatcher, EqualsMatcher

public interface ArgMatcher

An ArgMatcher allows different rules to be set for matching arguments to mock methods. Each implementation of ArgMatcher will define a specific rule for matching of an argument.

Several common implementations of ArgMatchers are provided with VirtualMock, and users can create their own custom implementations to define their own custom matching rules.

Version:
$Revision: 1.5 $
Author:
Chad Woolley

Method Summary
 boolean matches(java.lang.Object expectedArgument, java.lang.Object actualArgument)
          The method that VirtualMock will call to perform matching of an argument.
 

Method Detail

matches

public boolean matches(java.lang.Object expectedArgument,
                       java.lang.Object actualArgument)
The method that VirtualMock will call to perform matching of an argument. If the expected argument matches against the actual argument, then true should be returned. If not, false should be returned.

Parameters:
expectedArgument - The expected argument value that was passed when the mocked call was recorded
actualArgument - The actual argument value that was passed when the class under test invoked the recorded call.
Returns:
true if verification passes, false if it does not


Copyright © 2003-2005 Virtual Mock. All Rights Reserved.