cz.pumpitup.pn5.reporting.prometheus.PrometheusReporterService Maven / Gradle / Ivy
package cz.pumpitup.pn5.reporting.prometheus;
import cz.pumpitup.pn5.reporting.NullReporter;
import cz.pumpitup.pn5.reporting.junit.JUnitReporterService;
import cz.pumpitup.pn5.reporting.spi.ReporterSPI;
import org.junit.jupiter.api.extension.ExtensionContext;
public class PrometheusReporterService implements JUnitReporterService {
@Override
public ReporterSPI getReporter(ExtensionContext extensionContext) {
final PrometheusReporter prometheusReporter = PrometheusReporter.resolve(extensionContext);
if (prometheusReporter == null) {
return new NullReporter();
}
return prometheusReporter;
}
}