From 4a910b93308166e649c2e7eda41172d606c162a6 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Wed, 17 Jan 2024 17:17:53 +0100 Subject: [PATCH] Add an assertion for the test strength. --- .../coverage/metrics/steps/CoveragePluginITest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugin/src/test/java/io/jenkins/plugins/coverage/metrics/steps/CoveragePluginITest.java b/plugin/src/test/java/io/jenkins/plugins/coverage/metrics/steps/CoveragePluginITest.java index b650790e..23385c97 100644 --- a/plugin/src/test/java/io/jenkins/plugins/coverage/metrics/steps/CoveragePluginITest.java +++ b/plugin/src/test/java/io/jenkins/plugins/coverage/metrics/steps/CoveragePluginITest.java @@ -369,6 +369,13 @@ private void verifyOnePitResult(final ParameterizedJob project) { assertThat(m.getCovered()).isEqualTo(222); assertThat(m.getTotal()).isEqualTo(246); }); + assertThat(coverageResult.getAllValues(Baseline.PROJECT)) + .filteredOn(Value::getMetric, Metric.TEST_STRENGTH) + .first() + .isInstanceOfSatisfying(Coverage.class, m -> { + assertThat(m.getCovered()).isEqualTo(222); + assertThat(m.getTotal()).isEqualTo(230); + }); } private static CoverageBuilder createLineCoverageBuilder() {