public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable { if (new ObjectMethodsGuru().isToString(method)) { return "SmartNull returned by this unstubbed method call on a mock:\n" + invocation.toString(); } new Reporter().smartNullPointerException(invocation.toString(), location); return null; }
void assertWantedIsVerifiable() { if (wanted == null) { return; } ObjectMethodsGuru o = new ObjectMethodsGuru(); if (o.isToString(wanted.getMethod())) { new Reporter().cannotVerifyToString(); } }
public Object answer(InvocationOnMock currentInvocation) throws Throwable { if (new ObjectMethodsGuru().isToString(currentInvocation.getMethod())) { return "SmartNull returned by this unstubbed method call on a mock:\n" + unstubbedInvocation.toString(); } new Reporter().smartNullPointerException(unstubbedInvocation.toString(), location); return null; }
public boolean isToString() { return new ObjectMethodsGuru().isToString(getMethod()); }
public boolean isOut(Invocation invocation) { return new ObjectMethodsGuru().isToString(invocation.getMethod()); }