136137138139140141142
} } private class OngoingStubbingImpl implements NewOngoingStubbing<T>, DeprecatedOngoingStubbing<T> { public NewOngoingStubbing<T> thenReturn(Object value) { return thenAnswer(new Returns(value)); }
150151152153154155156
mockitoStubber.addAnswer(answer); return new ConsecutiveStubbing(); } public DeprecatedOngoingStubbing<T> toReturn(Object value) { return toAnswer(new Returns(value)); }
166167168169170171172
} } private class ConsecutiveStubbing implements NewOngoingStubbing<T>, DeprecatedOngoingStubbing<T> { public NewOngoingStubbing<T> thenReturn(Object value) { return thenAnswer(new Returns(value)); }
179180181182183184185
mockitoStubber.addConsecutiveAnswer(answer); return this; } public DeprecatedOngoingStubbing<T> toReturn(Object value) { return toAnswer(new Returns(value)); }
897898899900901902903
* * @param toBeReturned to be returned when the stubbed method is called * @return stubber - to select a method for stubbing */ public static Stubber doReturn(Object toBeReturned) { return doAnswer(new Returns(toBeReturned)); }
847848849850851852853
151152153154155156157158
} private class OngoingStubbingImpl implements OngoingStubbing<T> { public OngoingStubbing<T> toReturn(Object value) { verifyingRecorder.eraseLastInvocation(); mockitoStubber.addAnswer(new Returns(value)); return new ConsecutiveStubbing(); }
170171172173174175176177
} } private class ConsecutiveStubbing implements OngoingStubbing<T> { public OngoingStubbing<T> toReturn(Object value) { mockitoStubber.addConsecutiveAnswer(new Returns(value)); return this; }
1028102910301031103210331034
146147148149150151152
} } private abstract class BaseStubbing implements NewOngoingStubbing<T>, DeprecatedOngoingStubbing<T> { public NewOngoingStubbing<T> thenReturn(T value) { return thenAnswer(new Returns(value)); }