virtual bool matches(Invocation& invocation) override { if (&invocation.getMethod() != &stubbingContext->getMethodMock().getMethod()) { return false; } ActualInvocation<arglist...>& actualInvocation = dynamic_cast<ActualInvocation<arglist...>&>(invocation); return invocationMatcher->matches(actualInvocation); }
/** * Used only by Verify phrase. */ bool matches(Invocation &invocation) { MethodInfo &actualMethod = invocation.getMethod(); if (!getStubbingContext().isOfMethod(actualMethod)) { return false; } ActualInvocation<arglist...> &actualInvocation = dynamic_cast<ActualInvocation<arglist...> &>(invocation); return _invocationMatcher->matches(actualInvocation); }