Uses of Interface
org.mockito.ArgumentMatcher
-
Packages that use ArgumentMatcher Package Description org.mockito Mockito is a mock library for java - seeMockitoclass 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> TArgumentMatchers. argThat(ArgumentMatcher<T> matcher)Allows creating custom argument matchers.static booleanArgumentMatchers. booleanThat(ArgumentMatcher<java.lang.Boolean> matcher)Allows creating custombooleanargument matchers.static byteArgumentMatchers. byteThat(ArgumentMatcher<java.lang.Byte> matcher)Allows creating custombyteargument matchers.static charArgumentMatchers. charThat(ArgumentMatcher<java.lang.Character> matcher)Allows creating customcharargument matchers.static doubleArgumentMatchers. doubleThat(ArgumentMatcher<java.lang.Double> matcher)Allows creating customdoubleargument matchers.static floatArgumentMatchers. floatThat(ArgumentMatcher<java.lang.Float> matcher)Allows creating customfloatargument matchers.static intArgumentMatchers. intThat(ArgumentMatcher<java.lang.Integer> matcher)Allows creating customintargument matchers.static longArgumentMatchers. longThat(ArgumentMatcher<java.lang.Long> matcher)Allows creating customlongargument matchers.private static voidAdditionalMatchers. reportMatcher(ArgumentMatcher<?> matcher)private static voidArgumentMatchers. reportMatcher(ArgumentMatcher<?> matcher)static shortArgumentMatchers. shortThat(ArgumentMatcher<java.lang.Short> matcher)Allows creating customshortargument matchers. -
Uses of ArgumentMatcher in org.mockito.internal.hamcrest
Classes in org.mockito.internal.hamcrest that implement ArgumentMatcher Modifier and Type Class Description classHamcrestArgumentMatcher<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. matchersprivate java.util.List<ArgumentMatcher<?>>MatcherApplicationStrategy. matchersMethods 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 booleanArgumentMatcherAction. apply(ArgumentMatcher<?> matcher, java.lang.Object argument)Implementations must apply the given matcher to the argument and returntrueif the operation was successful orfalseif not.booleanTypeSafeMatching. apply(ArgumentMatcher matcher, java.lang.Object argument)private static java.lang.Class<?>TypeSafeMatching. getArgumentType(ArgumentMatcher<?> argumentMatcher)Returns the type ofmatches(Object)of the givenArgumentMatcherimplementation.private static booleanTypeSafeMatching. isCompatible(ArgumentMatcher<?> argumentMatcher, java.lang.Object argument)Returnstrueif the given argument can be passed to the givenargumentMatcherwithout 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 MatcherApplicationStrategyMatcherApplicationStrategy. getMatcherApplicationStrategyFor(Invocation invocation, java.util.List<ArgumentMatcher<?>> matchers)Returns theMatcherApplicationStrategythat must be used to capture the arguments of the given invocation using the given matchers.private static MatcherApplicationStrategy.MatcherApplicationTypeMatcherApplicationStrategy. getMatcherApplicationType(Invocation invocation, java.util.List<ArgumentMatcher<?>> matchers)private static booleanMatcherApplicationStrategy. 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 classAndclassAnyclassArrayEqualsclassCapturingMatcher<T>classCompareEqual<T extends java.lang.Comparable<T>>classCompareTo<T extends java.lang.Comparable<T>>classContainsclassEndsWithclassEqualsclassEqualsWithDeltaclassFindclassGreaterOrEqual<T extends java.lang.Comparable<T>>classGreaterThan<T extends java.lang.Comparable<T>>classInstanceOfstatic classInstanceOf.VarArgAwareclassLessOrEqual<T extends java.lang.Comparable<T>>classLessThan<T extends java.lang.Comparable<T>>classMatchesclassNotclassNotNullclassNullclassOrclassSameclassStartsWithFields in org.mockito.internal.matchers declared as ArgumentMatcher Modifier and Type Field Description private ArgumentMatcherAnd. m1private ArgumentMatcherOr. m1private ArgumentMatcherAnd. m2private ArgumentMatcherOr. m2private ArgumentMatcher<?>LocalizedMatcher. matcherprivate ArgumentMatcherNot. matcherMethods 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 classReflectionEquals -
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.StringMatcherToString. 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.StringMatchersPrinter. getArgumentsBlock(java.util.List<ArgumentMatcher> matchers, PrintSettings printSettings)java.lang.StringMatchersPrinter. 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 voidArgumentMatcherStorage. reportMatcher(ArgumentMatcher<?> matcher)voidArgumentMatcherStorageImpl. 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.StringPrintSettings. 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 booleanArgumentMatchingTool. safelyMatches(ArgumentMatcher m, java.lang.Object arg)private static booleanArgumentMatchingTool. 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.
-