com.hammingweight.hammock
Class PromiscuousArgumentMatcher
java.lang.Object
com.hammingweight.hammock.PromiscuousArgumentMatcher
- All Implemented Interfaces:
- IArgumentMatcher
public class PromiscuousArgumentMatcher
- extends java.lang.Object
- implements IArgumentMatcher
The PromiscuousArgumentMatcher
always returns that two method
arguments are equal. This argument matcher is used if a
MethodHandler
should ignore a method argument when determining
whether a method was invoked with the expected arguments.
- Since:
- Hammock 1.4
- Author:
- C.A. Meijer
Method Summary |
boolean |
areArgumentsEqual(java.lang.Object argumentExpected,
java.lang.Object argumentActual)
A method to determine whether an argument passed in a method invocation
of a mock object is equal to the expected argument. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PromiscuousArgumentMatcher
public PromiscuousArgumentMatcher()
areArgumentsEqual
public boolean areArgumentsEqual(java.lang.Object argumentExpected,
java.lang.Object argumentActual)
- Description copied from interface:
IArgumentMatcher
- A method to determine whether an argument passed in a method invocation
of a mock object is equal to the expected argument.
- Specified by:
areArgumentsEqual
in interface IArgumentMatcher
- Parameters:
argumentExpected
- The expected argument.argumentActual
- The argument that was actually passed to a method.
- Returns:
- Always returns true.