@Override public List<Invocation> getAllInvocations() { return invocations.getInvocations(); }
public List<Invocation> getRegisteredInvocations() { //TODO interface for tests return invocationContainer.getInvocations(); }
public List<Invocation> getRegisteredInvocations() { //TODO interface for tests return invocationContainerImpl.getInvocations(); }
@Override public Collection<Invocation> getInvocations() { return getInvocationContainer().getInvocations(); }
public Object[] ignoreStubs(Object... mocks) { for (Object m : mocks) { InvocationContainerImpl container = getInvocationContainer(m); List<Invocation> ins = container.getInvocations(); for (Invocation in : ins) { if (in.stubInfo() != null) { in.ignoreForVerification(); } } } return mocks; }
/** * Verify the same invocations have been applied to two mocks. This is generally not * the preferred way test with mockito and should be avoided if possible. * @param expected the mock containing expected invocations * @param actual the mock containing actual invocations * @param argumentAdapters adapters that can be used to change argument values before they are compared */ public static <T> void verifySameInvocations(T expected, T actual, InvocationArgumentsAdapter... argumentAdapters) { List<Invocation> expectedInvocations = ((InvocationContainerImpl) MockUtil.getMockHandler(expected).getInvocationContainer()).getInvocations(); List<Invocation> actualInvocations = ((InvocationContainerImpl) MockUtil.getMockHandler(actual).getInvocationContainer()).getInvocations(); verifySameInvocations(expectedInvocations, actualInvocations, argumentAdapters); }
public List<Invocation> getRegisteredInvocations() { //TODO interface for tests return invocationContainerImpl.getInvocations(); }