com.github.alkedr.matchers.reporting.AbsentMatcher Maven / Gradle / Ivy
package com.github.alkedr.matchers.reporting;
import com.github.alkedr.matchers.reporting.reporters.SafeTreeReporter;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
class AbsentMatcher extends BaseMatcher implements ReportingMatcher {
static final AbsentMatcher> INSTANCE = new AbsentMatcher<>();
private AbsentMatcher() {
}
@Override
public void run(Object item, SafeTreeReporter safeTreeReporter) {
safeTreeReporter.incorrectlyPresent();
}
@Override
public void runForAbsentItem(SafeTreeReporter safeTreeReporter) {
safeTreeReporter.correctlyAbsent();
}
@Override
public boolean matches(Object item) {
return false;
}
@Override
public void describeTo(Description description) {
description.appendText("absent");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy