Uses of Interface
org.mockito.ArgumentMatcher
Packages that use ArgumentMatcher
Package
Description
Mockito is a mock library for java - see
Mockito
class for usage.Invocation machinery and related classes.
Argument matchers for verification and stubbing.
Argument matchers that use Apache Commons Lang reflection-equality.
Mocking progress stateful classes.
Deals with nicely printing verification errors.
Deals with matching arguments.
Public API related to mock method invocations.
-
Uses of ArgumentMatcher in org.mockito
Methods in org.mockito with parameters of type ArgumentMatcherModifier and TypeMethodDescriptionstatic <T> T
ArgumentMatchers.argThat
(ArgumentMatcher<T> matcher) Allows creating custom argument matchers.static boolean
ArgumentMatchers.booleanThat
(ArgumentMatcher<Boolean> matcher) Allows creating customboolean
argument matchers.static byte
ArgumentMatchers.byteThat
(ArgumentMatcher<Byte> matcher) Allows creating custombyte
argument matchers.static char
ArgumentMatchers.charThat
(ArgumentMatcher<Character> matcher) Allows creating customchar
argument matchers.static double
ArgumentMatchers.doubleThat
(ArgumentMatcher<Double> matcher) Allows creating customdouble
argument matchers.static float
ArgumentMatchers.floatThat
(ArgumentMatcher<Float> matcher) Allows creating customfloat
argument matchers.static int
ArgumentMatchers.intThat
(ArgumentMatcher<Integer> matcher) Allows creating customint
argument matchers.static long
ArgumentMatchers.longThat
(ArgumentMatcher<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<Short> matcher) Allows creating customshort
argument matchers. -
Uses of ArgumentMatcher in org.mockito.internal.hamcrest
Classes in org.mockito.internal.hamcrest that implement ArgumentMatcher -
Uses of ArgumentMatcher in org.mockito.internal.invocation
Fields in org.mockito.internal.invocation with type parameters of type ArgumentMatcherModifier and TypeFieldDescriptionprivate final List<ArgumentMatcher<?>>
InvocationMatcher.matchers
private final List<ArgumentMatcher<?>>
MatcherApplicationStrategy.matchers
Methods in org.mockito.internal.invocation that return ArgumentMatcherModifier and TypeMethodDescriptionprivate static ArgumentMatcher<?>
MatcherApplicationStrategy.lastMatcher
(List<ArgumentMatcher<?>> matchers) Methods in org.mockito.internal.invocation that return types with arguments of type ArgumentMatcherModifier and TypeMethodDescriptionprivate static List<ArgumentMatcher<?>>
MatcherApplicationStrategy.appendLastMatcherNTimes
(List<ArgumentMatcher<?>> matchers, int timesToAppendLastMatcher) static List<ArgumentMatcher>
ArgumentsProcessor.argumentsToMatchers
(Object[] arguments) InterceptedInvocation.getArgumentsAsMatchers()
InvocationMatcher.getMatchers()
Methods in org.mockito.internal.invocation with parameters of type ArgumentMatcherModifier and TypeMethodDescriptionboolean
ArgumentMatcherAction.apply
(ArgumentMatcher<?> matcher, 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, Object argument) private static Class<?>
TypeSafeMatching.getArgumentType
(ArgumentMatcher<?> argumentMatcher) Returns the type ofmatches(Object)
of the givenArgumentMatcher
implementation.private static boolean
TypeSafeMatching.isCompatible
(ArgumentMatcher<?> argumentMatcher, 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 ArgumentMatcherModifier and TypeMethodDescriptionprivate static List<ArgumentMatcher<?>>
MatcherApplicationStrategy.appendLastMatcherNTimes
(List<ArgumentMatcher<?>> matchers, int timesToAppendLastMatcher) static MatcherApplicationStrategy
MatcherApplicationStrategy.getMatcherApplicationStrategyFor
(Invocation invocation, 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, List<ArgumentMatcher<?>> matchers) private static boolean
MatcherApplicationStrategy.isLastMatcherVarargMatcher
(List<ArgumentMatcher<?>> matchers) private static ArgumentMatcher<?>
MatcherApplicationStrategy.lastMatcher
(List<ArgumentMatcher<?>> matchers) Constructor parameters in org.mockito.internal.invocation with type arguments of type ArgumentMatcherModifierConstructorDescriptionInvocationMatcher
(Invocation invocation, List<ArgumentMatcher> matchers) private
MatcherApplicationStrategy
(Invocation invocation, List<ArgumentMatcher<?>> matchers, MatcherApplicationStrategy.MatcherApplicationType matchingType) -
Uses of ArgumentMatcher in org.mockito.internal.matchers
Classes in org.mockito.internal.matchers that implement ArgumentMatcherModifier and TypeClassDescriptionclass
class
class
class
class
CompareEqual<T extends Comparable<T>>
class
CompareTo<T extends Comparable<T>>
class
class
class
class
class
class
GreaterOrEqual<T extends Comparable<T>>
class
GreaterThan<T extends Comparable<T>>
class
static class
class
LessOrEqual<T extends Comparable<T>>
class
LessThan<T extends Comparable<T>>
class
class
class
class
class
class
class
Fields in org.mockito.internal.matchers declared as ArgumentMatcherModifier and TypeFieldDescriptionprivate final ArgumentMatcher
And.m1
private final ArgumentMatcher
Or.m1
private final ArgumentMatcher
And.m2
private final ArgumentMatcher
Or.m2
private final ArgumentMatcher<?>
LocalizedMatcher.matcher
private final ArgumentMatcher
Not.matcher
Methods in org.mockito.internal.matchers that return ArgumentMatcherConstructors in org.mockito.internal.matchers with parameters of type ArgumentMatcherModifierConstructorDescriptionAnd
(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 -
Uses of ArgumentMatcher in org.mockito.internal.matchers.text
Methods in org.mockito.internal.matchers.text with parameters of type ArgumentMatcherModifier and TypeMethodDescription(package private) static 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 ArgumentMatcherModifier and TypeMethodDescriptionprivate Iterator<FormattedText>
MatchersPrinter.applyPrintSettings
(List<ArgumentMatcher> matchers, PrintSettings printSettings) MatchersPrinter.getArgumentsBlock
(List<ArgumentMatcher> matchers, PrintSettings printSettings) MatchersPrinter.getArgumentsLine
(List<ArgumentMatcher> matchers, PrintSettings printSettings) -
Uses of ArgumentMatcher in org.mockito.internal.progress
Methods in org.mockito.internal.progress that return ArgumentMatcherModifier and TypeMethodDescriptionprivate ArgumentMatcher<?>
ArgumentMatcherStorageImpl.popMatcher()
Methods in org.mockito.internal.progress with parameters of type ArgumentMatcherModifier and TypeMethodDescriptionvoid
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 ArgumentMatcherModifier and TypeMethodDescriptionPrintSettings.print
(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 ArgumentMatcherModifier and TypeMethodDescriptionprivate static boolean
ArgumentMatchingTool.safelyMatches
(ArgumentMatcher m, Object arg) private static boolean
ArgumentMatchingTool.toStringEquals
(ArgumentMatcher m, Object arg) Method parameters in org.mockito.internal.verification.argumentmatching with type arguments of type ArgumentMatcherModifier and TypeMethodDescriptionArgumentMatchingTool.getNotMatchingArgsWithSameName
(List<ArgumentMatcher> matchers, Object[] arguments) Suspiciously not matching arguments are those that don't match, and the classes have same simple name.static Integer[]
ArgumentMatchingTool.getSuspiciouslyNotMatchingArgsIndexes
(List<ArgumentMatcher> matchers, 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 ArgumentMatcherModifier and TypeMethodDescriptionInvocation.getArgumentsAsMatchers()
Wraps each argument usingArgumentMatchers.eq(Object)
orAdditionalMatchers.aryEq(Object[])
Used internally for the purposes of human-readable invocation printing.MatchableInvocation.getMatchers()
The argument matchers of this invocation.