com.github.alkedr.matchers.reporting.NoOpMatcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reporting-matchers Show documentation
Show all versions of reporting-matchers Show documentation
A library of hamcrest matchers
The newest version!
package com.github.alkedr.matchers.reporting;
import com.github.alkedr.matchers.reporting.reporters.SafeTreeReporter;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
// matches всегда возвращает true, в отчёт никогда ничего не добавляется
class NoOpMatcher extends BaseMatcher implements ReportingMatcher {
static final NoOpMatcher> INSTANCE = new NoOpMatcher<>();
@Override
public void run(Object item, SafeTreeReporter safeTreeReporter) {
}
@Override
public void runForAbsentItem(SafeTreeReporter safeTreeReporter) {
}
@Override
public boolean matches(Object item) {
return true;
}
@Override
public void describeTo(Description description) {
description.appendText("anything");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy