Added soft assertions
This commit is contained in:
parent
10292cfec5
commit
b2a67a1262
1 changed files with 6 additions and 3 deletions
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package rife.bld.extension;
|
package rife.bld.extension;
|
||||||
|
|
||||||
|
import org.assertj.core.api.AutoCloseableSoftAssertions;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import rife.bld.Project;
|
import rife.bld.Project;
|
||||||
import rife.bld.operations.exceptions.ExitStatusException;
|
import rife.bld.operations.exceptions.ExitStatusException;
|
||||||
|
@ -88,9 +89,11 @@ class JacocoReportOperationTest {
|
||||||
assertThat(csv).exists();
|
assertThat(csv).exists();
|
||||||
assertThat(html).isDirectory();
|
assertThat(html).isDirectory();
|
||||||
assertThat(xml).exists();
|
assertThat(xml).exists();
|
||||||
try (var lines = Files.lines(xml.toPath())) {
|
try (var softly = new AutoCloseableSoftAssertions()) {
|
||||||
assertThat(lines.anyMatch(s ->
|
try (var lines = Files.lines(xml.toPath())) {
|
||||||
s.contains("<counter type=\"INSTRUCTION\" missed=\"0\" covered=\"3\"/>"))).isTrue();
|
softly.assertThat(lines.anyMatch(s ->
|
||||||
|
s.contains("<counter type=\"INSTRUCTION\" missed=\"0\" covered=\"3\"/>"))).isTrue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
assertThat(Path.of(html.getPath(), "com.example", "Examples.java.html")).exists();
|
assertThat(Path.of(html.getPath(), "com.example", "Examples.java.html")).exists();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue