com.hammingweight.hammock
Class ClassArgumentMatcher

java.lang.Object
  extended by com.hammingweight.hammock.ClassArgumentMatcher
All Implemented Interfaces:
IArgumentMatcher

public class ClassArgumentMatcher
extends java.lang.Object
implements IArgumentMatcher

The ClassArgumentMatcher class checks that a method argument is an instance of the expected class.

Since:
Hammock 1.6
Author:
C.A. Meijer

Constructor Summary
ClassArgumentMatcher()
           
 
Method Summary
 boolean areArgumentsEqual(java.lang.Object argumentExpected, java.lang.Object argumentActual)
          A method to check that the class of the actual argument is the same as or a subclass of the expected argument.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassArgumentMatcher

public ClassArgumentMatcher()
Method Detail

areArgumentsEqual

public boolean areArgumentsEqual(java.lang.Object argumentExpected,
                                 java.lang.Object argumentActual)
A method to check that the class of the actual argument is the same as or a subclass of the expected argument.

Specified by:
areArgumentsEqual in interface IArgumentMatcher
Parameters:
argumentExpected - The expected argument.
argumentActual - The actual argument.
Returns:
true if the actual argument can be cast to the class of the expected argument.