Uses of Interface
org.mockito.ArgumentMatcher
-
Packages that use ArgumentMatcher Package Description org.mockito Mockito is a mock library for java - seeMockito
class for usage.org.mockito.internal.hamcrest org.mockito.internal.invocation Invocation machinery and related classes.org.mockito.internal.matchers Argument matchers for verification and stubbing.org.mockito.internal.matchers.apachecommons Argument matchers that use Apache Commons Lang reflection-equality.org.mockito.internal.matchers.text org.mockito.internal.progress Mocking progress stateful classes.org.mockito.internal.reporting Deals with nicely printing verification errors.org.mockito.internal.verification.argumentmatching Deals with matching arguments.org.mockito.invocation Public API related to mock method invocations. -
-
Uses of ArgumentMatcher in org.mockito
Methods in org.mockito with parameters of type ArgumentMatcher Modifier and Type Method Description static <T> T
ArgumentMatchers. argThat(ArgumentMatcher<T> matcher)
Allows creating custom argument matchers.static boolean
ArgumentMatchers. booleanThat(ArgumentMatcher<java.lang.Boolean> matcher)
Allows creating customboolean
argument matchers.static byte
ArgumentMatchers. byteThat(ArgumentMatcher<java.lang.Byte> matcher)
Allows creating custombyte
argument matchers.static char
ArgumentMatchers. charThat(ArgumentMatcher<java.lang.Character> matcher)
Allows creating customchar
argument matchers.static double
ArgumentMatchers. doubleThat(ArgumentMatcher<java.lang.Double> matcher)
Allows creating customdouble
argument matchers.static float
ArgumentMatchers. floatThat(ArgumentMatcher<java.lang.Float> matcher)
Allows creating customfloat
argument matchers.static int
ArgumentMatchers. intThat(ArgumentMatcher<java.lang.Integer> matcher)
Allows creating customint
argument matchers.static long
ArgumentMatchers. longThat(ArgumentMatcher<java.lang.Long> matcher)
Allows creating customlong
argument matchers.private static void
AdditionalMatchers. reportMatcher(ArgumentMatcher<?> matcher)
private static void
ArgumentMatchers. reportMatcher(ArgumentMatcher<?> matcher)
static short
ArgumentMatchers. shortThat(ArgumentMatcher<java.lang.Short> matcher)
Allows creating customshort
argument matchers. -
Uses of ArgumentMatcher in org.mockito.internal.hamcrest
Classes in org.mockito.internal.hamcrest that implement ArgumentMatcher Modifier and Type Class Description class
HamcrestArgumentMatcher<T>
-
Uses of ArgumentMatcher in org.mockito.internal.invocation
Fields in org.mockito.internal.invocation with type parameters of type ArgumentMatcher Modifier and Type Field Description private java.util.List<ArgumentMatcher<?>>
InvocationMatcher. matchers
private java.util.List<ArgumentMatcher<?>>
MatcherApplicationStrategy. matchers
Methods in org.mockito.internal.invocation that return ArgumentMatcher Modifier and Type Method Description private static ArgumentMatcher<?>
MatcherApplicationStrategy. lastMatcher(java.util.List<ArgumentMatcher<?>> matchers)
Methods in org.mockito.internal.invocation that return types with arguments of type ArgumentMatcher Modifier and Type Method Description private static java.util.List<ArgumentMatcher<?>>
MatcherApplicationStrategy. appendLastMatcherNTimes(java.util.List<ArgumentMatcher<?>> matchers, int timesToAppendLastMatcher)
static java.util.List<ArgumentMatcher>
ArgumentsProcessor. argumentsToMatchers(java.lang.Object[] arguments)
java.util.List<ArgumentMatcher>
InterceptedInvocation. getArgumentsAsMatchers()
java.util.List<ArgumentMatcher>
InvocationMatcher. getMatchers()
Methods in org.mockito.internal.invocation with parameters of type ArgumentMatcher Modifier and Type Method Description boolean
ArgumentMatcherAction. apply(ArgumentMatcher<?> matcher, java.lang.Object argument)
Implementations must apply the given matcher to the argument and returntrue
if the operation was successful orfalse
if not.boolean
TypeSafeMatching. apply(ArgumentMatcher matcher, java.lang.Object argument)
private static java.lang.Class<?>
TypeSafeMatching. getArgumentType(ArgumentMatcher<?> argumentMatcher)
Returns the type ofmatches(Object)
of the givenArgumentMatcher
implementation.private static boolean
TypeSafeMatching. isCompatible(ArgumentMatcher<?> argumentMatcher, java.lang.Object argument)
Returnstrue
if the given argument can be passed to the givenargumentMatcher
without causing aClassCastException
.Method parameters in org.mockito.internal.invocation with type arguments of type ArgumentMatcher Modifier and Type Method Description private static java.util.List<ArgumentMatcher<?>>
MatcherApplicationStrategy. appendLastMatcherNTimes(java.util.List<ArgumentMatcher<?>> matchers, int timesToAppendLastMatcher)
static MatcherApplicationStrategy
MatcherApplicationStrategy. getMatcherApplicationStrategyFor(Invocation invocation, java.util.List<ArgumentMatcher<?>> matchers)
Returns theMatcherApplicationStrategy
that must be used to capture the arguments of the given invocation using the given matchers.private static MatcherApplicationStrategy.MatcherApplicationType
MatcherApplicationStrategy. getMatcherApplicationType(Invocation invocation, java.util.List<ArgumentMatcher<?>> matchers)
private static boolean
MatcherApplicationStrategy. isLastMatcherVarargMatcher(java.util.List<ArgumentMatcher<?>> matchers)
private static ArgumentMatcher<?>
MatcherApplicationStrategy. lastMatcher(java.util.List<ArgumentMatcher<?>> matchers)
Constructor parameters in org.mockito.internal.invocation with type arguments of type ArgumentMatcher Constructor Description InvocationMatcher(Invocation invocation, java.util.List<ArgumentMatcher> matchers)
MatcherApplicationStrategy(Invocation invocation, java.util.List<ArgumentMatcher<?>> matchers, MatcherApplicationStrategy.MatcherApplicationType matchingType)
-
Uses of ArgumentMatcher in org.mockito.internal.matchers
Classes in org.mockito.internal.matchers that implement ArgumentMatcher Modifier and Type Class Description class
And
class
Any
class
ArrayEquals
class
CapturingMatcher<T>
class
CompareEqual<T extends java.lang.Comparable<T>>
class
CompareTo<T extends java.lang.Comparable<T>>
class
Contains
class
EndsWith
class
Equals
class
EqualsWithDelta
class
Find
class
GreaterOrEqual<T extends java.lang.Comparable<T>>
class
GreaterThan<T extends java.lang.Comparable<T>>
class
InstanceOf
static class
InstanceOf.VarArgAware
class
LessOrEqual<T extends java.lang.Comparable<T>>
class
LessThan<T extends java.lang.Comparable<T>>
class
Matches
class
Not
class
NotNull
class
Null
class
Or
class
Same
class
StartsWith
Fields in org.mockito.internal.matchers declared as ArgumentMatcher Modifier and Type Field Description private ArgumentMatcher
And. m1
private ArgumentMatcher
Or. m1
private ArgumentMatcher
And. m2
private ArgumentMatcher
Or. m2
private ArgumentMatcher<?>
LocalizedMatcher. matcher
private ArgumentMatcher
Not. matcher
Methods in org.mockito.internal.matchers that return ArgumentMatcher Modifier and Type Method Description ArgumentMatcher<?>
LocalizedMatcher. getMatcher()
Constructors in org.mockito.internal.matchers with parameters of type ArgumentMatcher Constructor Description And(ArgumentMatcher<?> m1, ArgumentMatcher<?> m2)
LocalizedMatcher(ArgumentMatcher<?> matcher)
Not(ArgumentMatcher<?> matcher)
Or(ArgumentMatcher<?> m1, ArgumentMatcher<?> m2)
-
Uses of ArgumentMatcher in org.mockito.internal.matchers.apachecommons
Classes in org.mockito.internal.matchers.apachecommons that implement ArgumentMatcher Modifier and Type Class Description class
ReflectionEquals
-
Uses of ArgumentMatcher in org.mockito.internal.matchers.text
Methods in org.mockito.internal.matchers.text with parameters of type ArgumentMatcher Modifier and Type Method Description (package private) static java.lang.String
MatcherToString. toString(ArgumentMatcher<?> matcher)
Attempts to provide more descriptive toString() for given matcher.Method parameters in org.mockito.internal.matchers.text with type arguments of type ArgumentMatcher Modifier and Type Method Description private java.util.Iterator<FormattedText>
MatchersPrinter. applyPrintSettings(java.util.List<ArgumentMatcher> matchers, PrintSettings printSettings)
java.lang.String
MatchersPrinter. getArgumentsBlock(java.util.List<ArgumentMatcher> matchers, PrintSettings printSettings)
java.lang.String
MatchersPrinter. getArgumentsLine(java.util.List<ArgumentMatcher> matchers, PrintSettings printSettings)
-
Uses of ArgumentMatcher in org.mockito.internal.progress
Methods in org.mockito.internal.progress that return ArgumentMatcher Modifier and Type Method Description private ArgumentMatcher<?>
ArgumentMatcherStorageImpl. popMatcher()
Methods in org.mockito.internal.progress with parameters of type ArgumentMatcher Modifier and Type Method Description void
ArgumentMatcherStorage. reportMatcher(ArgumentMatcher<?> matcher)
void
ArgumentMatcherStorageImpl. reportMatcher(ArgumentMatcher<?> matcher)
-
Uses of ArgumentMatcher in org.mockito.internal.reporting
Method parameters in org.mockito.internal.reporting with type arguments of type ArgumentMatcher Modifier and Type Method Description java.lang.String
PrintSettings. print(java.util.List<ArgumentMatcher> matchers, Invocation invocation)
-
Uses of ArgumentMatcher in org.mockito.internal.verification.argumentmatching
Methods in org.mockito.internal.verification.argumentmatching with parameters of type ArgumentMatcher Modifier and Type Method Description private static boolean
ArgumentMatchingTool. safelyMatches(ArgumentMatcher m, java.lang.Object arg)
private static boolean
ArgumentMatchingTool. toStringEquals(ArgumentMatcher m, java.lang.Object arg)
Method parameters in org.mockito.internal.verification.argumentmatching with type arguments of type ArgumentMatcher Modifier and Type Method Description static java.util.Set<java.lang.String>
ArgumentMatchingTool. getNotMatchingArgsWithSameName(java.util.List<ArgumentMatcher> matchers, java.lang.Object[] arguments)
Suspiciously not matching arguments are those that don't match, and the classes have same simple name.static java.lang.Integer[]
ArgumentMatchingTool. getSuspiciouslyNotMatchingArgsIndexes(java.util.List<ArgumentMatcher> matchers, java.lang.Object[] arguments)
Suspiciously not matching arguments are those that don't match, the toString() representation is the same but types are different. -
Uses of ArgumentMatcher in org.mockito.invocation
Methods in org.mockito.invocation that return types with arguments of type ArgumentMatcher Modifier and Type Method Description java.util.List<ArgumentMatcher>
Invocation. getArgumentsAsMatchers()
Wraps each argument usingArgumentMatchers.eq(Object)
orAdditionalMatchers.aryEq(Object[])
Used internally for the purposes of human-readable invocation printing.java.util.List<ArgumentMatcher>
MatchableInvocation. getMatchers()
The argument matchers of this invocation.
-