Last active
November 13, 2016 08:25
-
-
Save DeepSpawn/42e5e0d56cf87562e1d65e2ea66419cc to your computer and use it in GitHub Desktop.
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
class CustomVarargMatcher extends ArgumentMatcher<Object[]> implements VarargMatcher { | |
private String[] expectedValues; | |
CustomVarargMatcher(Object... expectedValues) { | |
this.expectedValues = expectedValues; | |
} | |
@Override | |
public boolean matches(Object varargArgument) { | |
return new EqualsBuilder() | |
.append(expectedValues, varargArgument) | |
.isEquals(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment