Search in sources :

Example 1 with ScenarioPrinter

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));
}
Also used : LocationImpl(org.mockito.internal.debugging.LocationImpl) ScenarioPrinter(org.mockito.internal.exceptions.util.ScenarioPrinter)

Aggregations

LocationImpl (org.mockito.internal.debugging.LocationImpl)1 ScenarioPrinter (org.mockito.internal.exceptions.util.ScenarioPrinter)1