use of org.mockito.internal.stubbing.InvocationContainer in project powermock by powermock.
the class MockitoMethodInvocationControl method verifyNoMoreInteractions.
public void verifyNoMoreInteractions() {
try {
final MockHandler mockHandler = methodInterceptorFilter.getHandler();
if (mockHandler instanceof MockHandler) {
InvocationContainer invocationContainer = Whitebox.invokeMethod(mockHandler, "getInvocationContainer");
VerificationDataImpl data = new VerificationDataImpl(invocationContainer, null);
VerificationModeFactory.noMoreInteractions().verify(data);
} else {
throw new RuntimeException("Cannot perform verifyNoMoreInteractions because of unknown mockhandler type " + mockHandler.getClass());
}
} catch (MockitoAssertionError e) {
InvocationControlAssertionError.updateErrorMessageForVerifyNoMoreInteractions(e);
throw e;
} catch (Exception e) {
throw new RuntimeException("PowerMock internal error", e);
}
}
Aggregations