use of org.mockito.internal.exceptions.util.ScenarioPrinter in project mockito by mockito.
the class Reporter method noMoreInteractionsWanted.
public static MockitoAssertionError noMoreInteractionsWanted(Invocation undesired, List<VerificationAwareInvocation> invocations) {
ScenarioPrinter scenarioPrinter = new ScenarioPrinter();
String scenario = scenarioPrinter.print(invocations);
return new NoInteractionsWanted(join("No interactions wanted here:", new LocationImpl(), "But found this interaction on mock '" + safelyGetMockName(undesired.getMock()) + "':", undesired.getLocation(), scenario));
}
Aggregations