org.unitils.mock.argumentmatcher
Interface ArgumentMatcher

All Known Implementing Classes:
AnyArgumentMatcher, DefaultArgumentMatcher, EqualsArgumentMatcher, LenEqArgumentMatcher, NotNullArgumentMatcher, NullArgumentMatcher, RefEqArgumentMatcher, SameArgumentMatcher

public interface ArgumentMatcher

A matcher that can check whether a given argument matches certain criteria.

Author:
Kenny Claes, Filip Neven, Tim Ducheyne

Nested Class Summary
static class ArgumentMatcher.MatchResult
           
 
Method Summary
 ArgumentMatcher.MatchResult matches(Object argument, Object argumentAtInvocationTime)
          Returns true if the given object matches this object's expected argument, false otherwise.
 

Method Detail

matches

ArgumentMatcher.MatchResult matches(Object argument,
                                    Object argumentAtInvocationTime)
Returns true if the given object matches this object's expected argument, false otherwise. The argumentAtInvocationTime is a copy (deep clone) of the arguments at the time of the invocation. This way the original values can still be used later-on even when changes occur to the original values (pass-by-value vs pass-by-reference).

Parameters:
argument - The argument that was used by reference, not null
argumentAtInvocationTime - Copy of the argument, taken at the time that the invocation was performed, not null
Returns:
The match result, not null


Copyright © 2011. All Rights Reserved.