Home
last modified time | relevance | path

Searched refs:mockMethod (Results 1 – 2 of 2) sorted by relevance

/external/mockito/src/main/java/org/mockito/internal/stubbing/defaultanswers/
DForwardsInvocations.java33 Method mockMethod = invocation.getMethod(); in answer() local
36 Method delegateMethod = getDelegateMethod(mockMethod); in answer()
38 … if (!compatibleReturnTypes(mockMethod.getReturnType(), delegateMethod.getReturnType())) { in answer()
39 …throw delegatedMethodHasWrongReturnType(mockMethod, delegateMethod, invocation.getMock(), delegate… in answer()
45 … throw delegatedMethodDoesNotExistOnDelegate(mockMethod, invocation.getMock(), delegatedObject); in answer()
52 private Method getDelegateMethod(Method mockMethod) throws NoSuchMethodException { in getDelegateMethod() argument
53 if (mockMethod.getDeclaringClass().isAssignableFrom(delegatedObject.getClass())) { in getDelegateMethod()
55 return mockMethod; in getDelegateMethod()
58 … return delegatedObject.getClass().getMethod(mockMethod.getName(), mockMethod.getParameterTypes()); in getDelegateMethod()
/external/mockito/src/main/java/org/mockito/internal/exceptions/
DReporter.java811 …public static MockitoException delegatedMethodHasWrongReturnType(Method mockMethod, Method delegat… in delegatedMethodHasWrongReturnType() argument
814 "When calling: " + mockMethod + " on mock: " + safelyGetMockName(mock), in delegatedMethodHasWrongReturnType()
815 …"return type should be: " + mockMethod.getReturnType().getSimpleName() + ", but was: " + delegateM… in delegatedMethodHasWrongReturnType()
821 …public static MockitoException delegatedMethodDoesNotExistOnDelegate(Method mockMethod, Object moc… in delegatedMethodDoesNotExistOnDelegate() argument
824 "When calling: " + mockMethod + " on mock: " + safelyGetMockName(mock), in delegatedMethodDoesNotExistOnDelegate()