APISonar


org.mockito.plugins.MockitoLogger.log

> org > mockito > plugins > MockitoLogger > log
org APIs mockito APIs plugins APIs MockitoLogger APIs log APIs

Example 1
private final MockitoLogger defaultLogger = new ConsoleMockitoLogger();

    public void log(Object what) {
        if (enabled.get()) {
            loggedItems.get().add(what);
        } else {
            defaultLogger.log(what);
        }
    }
Example 2
void format(String testName, MockitoLogger logger) {
        if (unused.isEmpty()) {
            return;
        }

        StubbingHint hint = new StubbingHint(testName);
        int x = 1;
        for (Stubbing candidate : unused) {
            if (!candidate.wasUsed()) {
                hint.appendLine(x++, ". Unused ", candidate.getInvocation().getLocation());
            }
        }
        logger.log(hint.toString());
    }