Home
last modified time | relevance | path

Searched refs:stubbing (Results 1 – 25 of 174) sorted by relevance

1234567

/external/mockito/src/main/java/org/mockito/internal/stubbing/
DBaseStubbing.java5 package org.mockito.internal.stubbing;
11 import org.mockito.internal.stubbing.answers.CallsRealMethods;
12 import org.mockito.internal.stubbing.answers.Returns;
13 import org.mockito.internal.stubbing.answers.ThrowsException;
14 import org.mockito.stubbing.OngoingStubbing;
25 OngoingStubbing<T> stubbing = thenReturn(value); in thenReturn() local
29 return stubbing.thenReturn(null); in thenReturn()
32 stubbing = stubbing.thenReturn(v); in thenReturn()
34 return stubbing; in thenReturn()
46 OngoingStubbing<T> stubbing = null; in thenThrow() local
[all …]
DStrictnessSelector.java5 package org.mockito.internal.stubbing;
9 import org.mockito.stubbing.Stubbing;
28 …public static Strictness determineStrictness(Stubbing stubbing, MockCreationSettings mockSettings,… in determineStrictness() argument
29 if (stubbing != null && stubbing.getStrictness() != null) { in determineStrictness()
30 return stubbing.getStrictness(); in determineStrictness()
DUnusedStubbingReporting.java5 package org.mockito.internal.stubbing;
8 import org.mockito.stubbing.Stubbing;
19 public static boolean shouldBeReported(Stubbing stubbing) { in shouldBeReported() argument
20 return !stubbing.wasUsed() && stubbing.getStrictness() != Strictness.LENIENT; in shouldBeReported()
DStubberImpl.java5 package org.mockito.internal.stubbing;
7 import org.mockito.internal.stubbing.answers.CallsRealMethods;
8 import org.mockito.internal.stubbing.answers.Returns;
9 import org.mockito.internal.stubbing.answers.ThrowsException;
12 import org.mockito.stubbing.Answer;
13 import org.mockito.stubbing.Stubber;
22 import static org.mockito.internal.stubbing.answers.DoesNothing.doesNothing;
DDefaultLenientStubber.java5 package org.mockito.internal.stubbing;
9 import org.mockito.stubbing.Answer;
10 import org.mockito.stubbing.LenientStubber;
11 import org.mockito.stubbing.OngoingStubbing;
12 import org.mockito.stubbing.Stubber;
DConsecutiveStubbing.java5 package org.mockito.internal.stubbing;
7 import org.mockito.stubbing.Answer;
8 import org.mockito.stubbing.OngoingStubbing;
DOngoingStubbingImpl.java5 package org.mockito.internal.stubbing;
9 import org.mockito.stubbing.Answer;
10 import org.mockito.stubbing.OngoingStubbing;
/external/mockito/src/main/java/org/mockito/
DAdditionalAnswers.java9 import org.mockito.internal.stubbing.answers.AnswersWithDelay;
10 import org.mockito.internal.stubbing.answers.ReturnsArgumentAt;
11 import org.mockito.internal.stubbing.answers.ReturnsElementsOf;
12 import org.mockito.internal.stubbing.defaultanswers.ForwardsInvocations;
13 import org.mockito.stubbing.Answer;
14 import org.mockito.stubbing.Answer1;
15 import org.mockito.stubbing.Answer2;
16 import org.mockito.stubbing.Answer3;
17 import org.mockito.stubbing.Answer4;
18 import org.mockito.stubbing.Answer5;
[all …]
DAnswers.java7 import org.mockito.internal.stubbing.answers.CallsRealMethods;
8 import org.mockito.internal.stubbing.defaultanswers.TriesToReturnSelf;
9 import org.mockito.internal.stubbing.defaultanswers.GloballyConfiguredAnswer;
10 import org.mockito.internal.stubbing.defaultanswers.ReturnsDeepStubs;
11 import org.mockito.internal.stubbing.defaultanswers.ReturnsMocks;
12 import org.mockito.internal.stubbing.defaultanswers.ReturnsSmartNulls;
14 import org.mockito.stubbing.Answer;
DMockito.java31 import org.mockito.stubbing.Answer;
32 import org.mockito.stubbing.Answer1;
33 import org.mockito.stubbing.LenientStubber;
34 import org.mockito.stubbing.OngoingStubbing;
35 import org.mockito.stubbing.Stubber;
36 import org.mockito.stubbing.Stubbing;
37 import org.mockito.stubbing.VoidAnswer1;
/external/mockito/src/main/java/org/mockito/internal/stubbing/defaultanswers/
DReturnsDeepStubs.java5 package org.mockito.internal.stubbing.defaultanswers;
11 import org.mockito.internal.stubbing.InvocationContainerImpl;
12 import org.mockito.internal.stubbing.StubbedInvocationMatcher;
17 import org.mockito.stubbing.Answer;
18 import org.mockito.stubbing.Stubbing;
64 for (Stubbing stubbing : container.getStubbingsDescending()) { in deepStub()
65 if (container.getInvocationForStubbing().matches(stubbing.getInvocation())) { in deepStub()
66 return stubbing.answer(invocation); in deepStub()
71 StubbedInvocationMatcher stubbing = recordDeepStubAnswer( in deepStub() local
78 stubbing.markStubUsed(stubbing.getInvocation()); in deepStub()
[all …]
/external/mockito/src/main/java/org/mockito/internal/stubbing/answers/
DAnswerFunctionalInterfaces.java5 package org.mockito.internal.stubbing.answers;
8 import org.mockito.stubbing.Answer;
9 import org.mockito.stubbing.Answer1;
10 import org.mockito.stubbing.Answer2;
11 import org.mockito.stubbing.Answer3;
12 import org.mockito.stubbing.Answer4;
13 import org.mockito.stubbing.Answer5;
14 import org.mockito.stubbing.VoidAnswer1;
15 import org.mockito.stubbing.VoidAnswer2;
16 import org.mockito.stubbing.VoidAnswer3;
[all …]
DDoesNothing.java5 package org.mockito.internal.stubbing.answers;
10 import org.mockito.stubbing.Answer;
11 import org.mockito.stubbing.ValidableAnswer;
DCallsRealMethods.java5 package org.mockito.internal.stubbing.answers;
10 import org.mockito.stubbing.Answer;
11 import org.mockito.stubbing.ValidableAnswer;
DAnswersWithDelay.java5 package org.mockito.internal.stubbing.answers;
8 import org.mockito.stubbing.Answer;
9 import org.mockito.stubbing.ValidableAnswer;
DClonesArguments.java5 package org.mockito.internal.stubbing.answers;
9 import org.mockito.internal.stubbing.defaultanswers.ReturnsEmptyValues;
12 import org.mockito.stubbing.Answer;
DReturns.java5 package org.mockito.internal.stubbing.answers;
10 import org.mockito.stubbing.Answer;
11 import org.mockito.stubbing.ValidableAnswer;
/external/mockito/src/main/java/org/mockito/internal/handler/
DMockHandlerImpl.java10 import org.mockito.internal.stubbing.InvocationContainerImpl;
11 import org.mockito.internal.stubbing.OngoingStubbingImpl;
12 import org.mockito.internal.stubbing.StubbedInvocationMatcher;
13 import org.mockito.internal.stubbing.answers.DefaultAnswerValidator;
87 StubbedInvocationMatcher stubbing = invocationContainer.findAnswerFor(invocation); in handle() local
89 notifyStubbedAnswerLookup(invocation, stubbing, invocationContainer.getStubbingsAscending(), in handle()
92 if (stubbing != null) { in handle()
93 stubbing.captureArgumentsFrom(invocation); in handle()
96 return stubbing.answer(invocation); in handle()
/external/mockito/src/main/java/org/mockito/internal/junit/
DArgMismatchFinder.java9 import org.mockito.stubbing.Stubbing;
22 for (Stubbing stubbing : AllInvocationsFinder.findStubbings(mocks)) { in getStubbingArgMismatches()
24 if (!stubbing.wasUsed() && stubbing.getInvocation().getMock() == i.getMock() in getStubbingArgMismatches()
25 … && stubbing.getInvocation().getMethod().getName().equals(i.getMethod().getName())) { in getStubbingArgMismatches()
26 mismatches.add(i, stubbing.getInvocation()); in getStubbingArgMismatches()
DUnusedStubbings.java10 import org.mockito.stubbing.Stubbing;
56 for (Stubbing stubbing : unused) { in reportUnused()
57 invocations.add(stubbing.getInvocation()); in reportUnused()
DStubbingArgMismatches.java22 public void add(Invocation invocation, Invocation stubbing) { in add() argument
23 Set<Invocation> matchingInvocations = mismatches.get(stubbing); in add()
26 mismatches.put(stubbing, matchingInvocations); in add()
/external/mockito/src/main/java/org/mockito/internal/listeners/
DStubbingLookupNotifier.java10 import org.mockito.stubbing.Stubbing;
31 final private Stubbing stubbing; field in StubbingLookupNotifier.Event
36 Stubbing stubbing, in Event() argument
40 this.stubbing = stubbing; in Event()
52 return stubbing; in getStubbingFound()
/external/mockito/src/test/java/org/mockitousage/stubbing/
DStubbingWithAdditionalAnswersTest.java5 package org.mockitousage.stubbing;
28 import org.mockito.stubbing.Answer1;
29 import org.mockito.stubbing.Answer2;
30 import org.mockito.stubbing.Answer3;
31 import org.mockito.stubbing.Answer4;
32 import org.mockito.stubbing.Answer5;
33 import org.mockito.stubbing.VoidAnswer1;
34 import org.mockito.stubbing.VoidAnswer2;
35 import org.mockito.stubbing.VoidAnswer3;
36 import org.mockito.stubbing.VoidAnswer4;
[all …]
/external/mockito/src/main/java/org/mockito/internal/
DMockitoCore.java15 import org.mockito.internal.stubbing.DefaultLenientStubber;
16 import org.mockito.internal.stubbing.InvocationContainerImpl;
17 import org.mockito.internal.stubbing.OngoingStubbingImpl;
18 import org.mockito.internal.stubbing.StubberImpl;
30 import org.mockito.stubbing.LenientStubber;
31 import org.mockito.stubbing.OngoingStubbing;
32 import org.mockito.stubbing.Stubber;
78 OngoingStubbing<T> stubbing = (OngoingStubbing<T>) mockingProgress.pullOngoingStubbing(); in when() local
79 if (stubbing == null) { in when()
83 return stubbing; in when()
/external/mockito/src/test/java/org/mockito/internal/junit/
DUnusedStubbingsTest.java9 import org.mockito.internal.stubbing.StubbedInvocationMatcher;
11 import org.mockito.stubbing.Stubbing;
19 import static org.mockito.internal.stubbing.answers.DoesNothing.doesNothing;

1234567