Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
We have found some strange behavior when using a
custom ParameterMatcher's parameterMatches()
method.
I have attached a zip file of a project that illustrates the
problems (it is an Eclipse project). By looking at the
test design and console output, the bugs should be
apparent.
Here is a summary and explanation of the bugs. The
example test uses a ClassUnderTest which calls a void
method on a Collaborator class, passing a single
parameter.
1. The parameterMatches method is invoked too many
times. Specifically, it seems to be invoked once for the
first call, twice for the second call, and twice for the
third call - even though there is only one parameter for
the method being called.
2. The expected value passed is not correct (this is
probably related to the previous bug). The first
expected value continues to be passed.