Home
last modified time | relevance | path

Searched refs:ArgumentMatcher (Results 1 – 25 of 48) sorted by relevance

12

/external/mockito/src/main/java/org/mockito/internal/invocation/
DMatcherApplicationStrategy.java14 import org.mockito.ArgumentMatcher;
22 private final List<ArgumentMatcher<?>> matchers;
27 …private MatcherApplicationStrategy(Invocation invocation, List<ArgumentMatcher<?>> matchers, Match… in MatcherApplicationStrategy()
51 …trategy getMatcherApplicationStrategyFor(Invocation invocation, List<ArgumentMatcher<?>> matchers)… in getMatcherApplicationStrategyFor()
79 ArgumentMatcher<?> matcher = matchers.get(i); in forEachMatcherAndArgument()
89 …pplicationType getMatcherApplicationType(Invocation invocation, List<ArgumentMatcher<?>> matchers)… in getMatcherApplicationType()
105 private static boolean isLastMatcherVargargMatcher(final List<ArgumentMatcher<?>> matchers) { in isLastMatcherVargargMatcher()
109 …private static List<ArgumentMatcher<?>> appendLastMatcherNTimes(List<ArgumentMatcher<?>> matchers,… in appendLastMatcherNTimes()
110 ArgumentMatcher<?> lastMatcher = lastMatcher(matchers); in appendLastMatcherNTimes()
112 List<ArgumentMatcher<?>> expandedMatchers = new ArrayList<ArgumentMatcher<?>>(matchers); in appendLastMatcherNTimes()
[all …]
DTypeSafeMatching.java9 import org.mockito.ArgumentMatcher;
23 public boolean apply(ArgumentMatcher matcher, Object argument) { in apply()
33 private static boolean isCompatible(ArgumentMatcher<?> argumentMatcher, Object argument) { in isCompatible()
46 private static Class<?> getArgumentType(ArgumentMatcher<?> argumentMatcher) { in getArgumentType()
DInvocationMatcher.java18 import org.mockito.ArgumentMatcher;
33 private final List<ArgumentMatcher<?>> matchers;
36 public InvocationMatcher(Invocation invocation, List<ArgumentMatcher> matchers) { in InvocationMatcher()
47 this(invocation, Collections.<ArgumentMatcher> emptyList()); in InvocationMatcher()
69 public List<ArgumentMatcher> getMatchers() { in getMatchers()
139 public boolean apply(ArgumentMatcher<?> matcher, Object argument) { in captureArgument()
DArgumentsProcessor.java7 import org.mockito.ArgumentMatcher;
54 public static List<ArgumentMatcher> argumentsToMatchers(Object[] arguments) { in argumentsToMatchers()
55 List<ArgumentMatcher> matchers = new ArrayList<ArgumentMatcher>(arguments.length); in argumentsToMatchers()
DMatchersBinder.java15 import org.mockito.ArgumentMatcher;
27 List<ArgumentMatcher> matchers = new LinkedList<ArgumentMatcher>(); in bindMatchers()
DArgumentMatcherAction.java7 import org.mockito.ArgumentMatcher;
31 boolean apply(ArgumentMatcher<?> matcher, Object argument); in apply()
/external/mockito/src/main/java/org/mockito/internal/matchers/
DAnd.java10 import org.mockito.ArgumentMatcher;
13 public class And implements ArgumentMatcher<Object>, Serializable {
14 private ArgumentMatcher m1;
15 private ArgumentMatcher m2;
17 public And(ArgumentMatcher<?> m1, ArgumentMatcher<?> m2) { in And()
DOr.java10 import org.mockito.ArgumentMatcher;
13 public class Or implements ArgumentMatcher<Object>, Serializable {
14 private final ArgumentMatcher m1;
15 private final ArgumentMatcher m2;
17 public Or(ArgumentMatcher<?> m1, ArgumentMatcher<?> m2) { in Or()
DNot.java8 import org.mockito.ArgumentMatcher;
13 public class Not implements ArgumentMatcher<Object>, Serializable {
15 private final ArgumentMatcher matcher;
17 public Not(ArgumentMatcher<?> matcher) { in Not()
DLocalizedMatcher.java7 import org.mockito.ArgumentMatcher;
14 private final ArgumentMatcher<?> matcher;
17 public LocalizedMatcher(ArgumentMatcher<?> matcher) { in LocalizedMatcher()
26 public ArgumentMatcher<?> getMatcher() { in getMatcher()
DAny.java10 import org.mockito.ArgumentMatcher;
12 public class Any implements ArgumentMatcher<Object>, VarargMatcher ,Serializable {
DNull.java8 import org.mockito.ArgumentMatcher;
12 public class Null implements ArgumentMatcher<Object>, Serializable {
/external/mockito/src/main/java/org/mockito/internal/progress/
DArgumentMatcherStorageImpl.java8 import org.mockito.ArgumentMatcher;
27 public void reportMatcher(ArgumentMatcher<?> matcher) { in reportMatcher()
43 ArgumentMatcher<?> m1 = popMatcher(); in reportAnd()
44 ArgumentMatcher<?> m2 = popMatcher(); in reportAnd()
52 ArgumentMatcher<?> m1 = popMatcher(); in reportOr()
53 ArgumentMatcher<?> m2 = popMatcher(); in reportOr()
61 ArgumentMatcher<?> m = popMatcher(); in reportNot()
87 private ArgumentMatcher<?> popMatcher() { in popMatcher()
/external/mockito/src/test/java/org/mockitousage/bugs/
DEqualsWithDeltaTest.java8 import org.mockito.ArgumentMatcher;
17 ArgumentMatcher<Number> matcher = equalsWithDelta(null); in testEqualsWithDelta_NullExpected()
23 ArgumentMatcher<Number> matcher = equalsWithDelta(1.0); in testEqualsWithDelta_NullActual()
29 ArgumentMatcher<Number> matcher = equalsWithDelta(null); in testEqualsWithDelta_NullActualAndExpected()
37 ArgumentMatcher<Number> matcher = equalsWithDelta(expected); in testEqualsWithDelta_WhenActualAndExpectedAreTheSameObject()
41 public ArgumentMatcher<Number> equalsWithDelta(final Double expected) { in equalsWithDelta()
DCompareMatcherTest.java17 import org.mockito.ArgumentMatcher;
85 class TestMatcher implements ArgumentMatcher<Integer> { in matchesOverloadsMustBeIgnored()
110 abstract class GenericMatcher<T> implements ArgumentMatcher<T> {} in matchesWithSubTypeExtendingGenericClass()
124 class GenericMatcher<T> implements ArgumentMatcher<T> { in matchesWithSubTypeGenericMethod()
/external/mockito/src/main/java/org/mockito/internal/verification/argumentmatching/
DArgumentMatchingTool.java7 import org.mockito.ArgumentMatcher;
20 …public static Integer[] getSuspiciouslyNotMatchingArgsIndexes(List<ArgumentMatcher> matchers, Obje… in getSuspiciouslyNotMatchingArgsIndexes()
27 for (ArgumentMatcher m : matchers) { in getSuspiciouslyNotMatchingArgsIndexes()
39 private static boolean safelyMatches(ArgumentMatcher m, Object arg) { in safelyMatches()
47 private static boolean toStringEquals(ArgumentMatcher m, Object arg) { in toStringEquals()
/external/mockito/src/test/java/org/mockito/internal/verification/argumentmatching/
DArgumentMatchingToolTest.java8 import org.mockito.ArgumentMatcher;
25 List<ArgumentMatcher> matchers = (List) Arrays.asList(new Equals(1)); in shouldNotFindAnySuspiciousMatchersWhenNumberOfArgumentsDoesntMatch()
37 List<ArgumentMatcher> matchers = (List) Arrays.asList(new Equals(10), new Equals(20)); in shouldNotFindAnySuspiciousMatchersWhenArgumentsMatch()
53 List<ArgumentMatcher> matchers = (List) Arrays.asList(new Equals(10), matcherInt20); in shouldFindSuspiciousMatchers()
93 class StringMatcher implements ArgumentMatcher<String>, ContainsExtraTypeInfo { in shouldUseMatchersSafely()
111 List<ArgumentMatcher> matchers = (List) singletonList(new StringMatcher()); in shouldUseMatchersSafely()
/external/mockito/src/main/java/org/mockito/internal/matchers/text/
DMatchersPrinter.java7 import org.mockito.ArgumentMatcher;
18 public String getArgumentsLine(List<ArgumentMatcher> matchers, PrintSettings printSettings) { in getArgumentsLine()
23 public String getArgumentsBlock(List<ArgumentMatcher> matchers, PrintSettings printSettings) { in getArgumentsBlock()
28 …private Iterator<FormattedText> applyPrintSettings(List<ArgumentMatcher> matchers, PrintSettings p… in applyPrintSettings()
31 for (final ArgumentMatcher matcher : matchers) { in applyPrintSettings()
/external/mockito/src/test/java/org/mockitousage/matchers/
DCustomMatchersTest.java10 import org.mockito.ArgumentMatcher;
24 private final class ContainsFoo implements ArgumentMatcher<String> {
30 private final class IsAnyBoolean implements ArgumentMatcher<Boolean> {
36 private final class IsSorZ implements ArgumentMatcher<Character> {
42 private final class IsZeroOrOne<T extends Number> implements ArgumentMatcher<T> {
138 private final class StringThatContainsXxx implements ArgumentMatcher<String> {
149 verify(mock).simpleMethod((String) argThat(new ArgumentMatcher<Object>() { in shouldAnonymousCustomMatcherPrintDefaultDescription()
DCustomMatcherDoesYieldCCETest.java8 import org.mockito.ArgumentMatcher;
36 private ArgumentMatcher<String> isStringWithTextFoo() { in isStringWithTextFoo()
37 return new ArgumentMatcher<String>() { in isStringWithTextFoo()
/external/mockito/src/main/java/org/mockito/
DArgumentMatchers.java1195 public static <T> T argThat(ArgumentMatcher<T> matcher) { in argThat()
1210 public static char charThat(ArgumentMatcher<Character> matcher) { in charThat()
1225 public static boolean booleanThat(ArgumentMatcher<Boolean> matcher) { in booleanThat()
1240 public static byte byteThat(ArgumentMatcher<Byte> matcher) { in byteThat()
1255 public static short shortThat(ArgumentMatcher<Short> matcher) { in shortThat()
1270 public static int intThat(ArgumentMatcher<Integer> matcher) { in intThat()
1285 public static long longThat(ArgumentMatcher<Long> matcher) { in longThat()
1300 public static float floatThat(ArgumentMatcher<Float> matcher) { in floatThat()
1315 public static double doubleThat(ArgumentMatcher<Double> matcher) { in doubleThat()
1320 private static void reportMatcher(ArgumentMatcher<?> matcher) { in reportMatcher()
/external/mockito/src/test/java/org/mockito/internal/invocation/
DMatcherApplicationStrategyTest.java19 import org.mockito.ArgumentMatcher;
200 private List<ArgumentMatcher<?>> matchers = new ArrayList<ArgumentMatcher<?>>();
203 public boolean apply(ArgumentMatcher<?> matcher, Object argument) { in apply()
212 public void assertContainsExactly(ArgumentMatcher<?>... matchers) { in assertContainsExactly()
219 public boolean apply(ArgumentMatcher<?> matcher, Object argument) {
226 public boolean apply(ArgumentMatcher<?> matcher, Object argument) {
DTypeSafeMatchingTest.java15 import org.mockito.ArgumentMatcher;
90 class TestMatcher implements ArgumentMatcher<Integer> { in matchesOverloadsMustBeIgnored()
114 abstract class GenericMatcher<T> implements ArgumentMatcher<T> { in matchesWithSubTypeExtendingGenericClass()
130 abstract class GenericMatcher<T> implements ArgumentMatcher<T> { in dontMatchesWithSubTypeExtendingGenericClass()
151 class GenericMatcher<T> implements ArgumentMatcher<T> { in passEveryArgumentTypeIfNoBridgeMethodWasGenerated()
/external/mockito/src/test/java/org/mockito/internal/matchers/
DMatchersToStringTest.java10 import org.mockito.ArgumentMatcher;
77 ArgumentMatcher<?> m1=new Equals(1); in orToString()
78 ArgumentMatcher<?> m2=new Equals(2); in orToString()
89 ArgumentMatcher<?> m1=new Equals(1); in andToString()
90 ArgumentMatcher<?> m2=new Equals(2); in andToString()
/external/mockito/src/test/java/org/mockito/internal/matchers/text/
DMatcherToStringTest.java8 import org.mockito.ArgumentMatcher;
15 static class MatcherWithoutDescription implements ArgumentMatcher<Object> {
21 static class MatcherWithDescription implements ArgumentMatcher<Object> {

12