Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unified logic of argument matching and capturing
- Loading branch information
Christian Schwarz
committed
Oct 2, 2016
1 parent
0fcad43
commit 026ba1d
Showing
9 changed files
with
1,028 additions
and
409 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/main/java/org/mockito/internal/invocation/ArgumentMatcherAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.mockito.internal.invocation; | ||
|
||
import org.mockito.ArgumentMatcher; | ||
|
||
public interface ArgumentMatcherAction { | ||
/** | ||
* Implementations must apply the given matcher to the argument and return | ||
* <code>true</code> if the operation was successful or <code>false</code> | ||
* if not. In this case no more matchers and arguments will be passed by | ||
* {@link MatcherApplicationStrategy#forEachMatcherAndArgument(ArgumentMatcherAction)} to this method. | ||
* . | ||
* | ||
* @param matcher | ||
* to process the argument, never <code>null</code> | ||
* @param argument | ||
* to be processed by the matcher, can be <code>null</code> | ||
* @return | ||
* <ul> | ||
* <li><code>true</code> if the <b>matcher</b> was successfully | ||
* applied to the <b>argument</b> and the next pair of matcher and | ||
* argument should be passed | ||
* <li><code>false</code> otherwise | ||
* </ul> | ||
* | ||
* | ||
*/ | ||
boolean apply(ArgumentMatcher<?> matcher, Object argument); | ||
} |
117 changes: 0 additions & 117 deletions
117
src/main/java/org/mockito/internal/invocation/ArgumentsComparator.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.