Home | History | Annotate | Download | only in littlemock

Lines Matching full:methodcall

154     private MethodCall mLastCall;
156 public void checkOrder(List<MethodCall> calls, String fieldName) {
157 MethodCall lastTrial = null;
158 for (MethodCall trial : calls) {
168 private String formatFailedVerifyOrderMessage(MethodCall lastCall, MethodCall thisCall,
209 List<MethodCall> mMethodCalls = getHandlerFrom(mock).mRecordedCalls;
226 List<MethodCall> unverifiedCalls = new ArrayList<MethodCall>();
227 for (MethodCall method : handlerFrom.mRecordedCalls) {
235 for (MethodCall method : unverifiedCalls) {
535 private static class MethodCall {
547 public MethodCall(Method method, StackTraceElement element, Object[] args) {
560 return "MethodCall [method=" + mMethod + ", args=" + Arrays.toString(mArgs) + "]";
611 private List<MethodCall> mRecordedCalls = new CopyOnWriteArrayList<MethodCall>();
692 MethodCall methodCall = new MethodCall(method, callSite, args);
693 innerVerify(method, matchers, methodCall, proxy, callSite, mHowManyTimes, mOrderCounter);
714 MethodCall methodCall = new MethodCall(method, callSite, args);
715 innerStub(method, matchers, methodCall, callSite, mStubbingAction);
728 MethodCall methodCall = new MethodCall(method, callSite, args);
729 return innerRecord(method, args, methodCall, proxy, callSite);
758 MethodCall methodCall, Object proxy, StackTraceElement callSite) throws Throwable {
769 mRecordedCalls.add(methodCall);
771 if (areMethodsSame(stubbedCall.mMethodCall.mMethod, methodCall.mMethod)) {
772 if (stubbedCall.mMethodCall.argsMatch(methodCall.mArgs)) {
773 methodCall.mWasVerified = true;
782 private void innerStub(Method method, final ArgumentMatcher[] matchers, MethodCall methodCall,
788 mStubbedCalls.add(0, new StubbedCall(methodCall, stubbingAction));
795 MethodCall matchMatchersMethodCall = new MethodCall(method, callSite, matchers) {
847 private void innerVerify(Method method, ArgumentMatcher[] matchers, MethodCall methodCall,
850 List<MethodCall> calls = countMatchingInvocations(method, matchers, methodCall);
862 fail(formatFailedVerifyMessage(methodCall, calls.size(), callTimeout, callCount));
864 calls = countMatchingInvocations(method, matchers, methodCall);
870 fail(formatFailedVerifyMessage(methodCall, calls.size(), 0, callCount));
875 private List<MethodCall> countMatchingInvocations(Method method, ArgumentMatcher[] matchers,
876 MethodCall methodCall) {
877 List<MethodCall> methodCalls = new ArrayList<MethodCall>();
878 for (MethodCall call : mRecordedCalls) {
881 call.argsMatch(methodCall.mArgs)) {
891 private String formatFailedVerifyMessage(MethodCall methodCall, int total, long timeoutMillis,
899 appendDebugStringForMethodCall(sb, methodCall.mMethod,
900 methodCall.mElement, mFieldName, false);
906 for (MethodCall recordedCall : mRecordedCalls) {
969 private final MethodCall mMethodCall;
972 public StubbedCall(MethodCall methodCall, Action action) {
973 mMethodCall = methodCall;
979 return "StubbedCall [methodCall=" + mMethodCall + ", action=" + mAction + "]";