Added soft assertions

This commit is contained in:
Erik C. Thauvin 2024-09-29 17:36:13 -07:00
parent 0429bbec0a
commit 41169b88d9
Signed by: erik
GPG key ID: 776702A6A2DA330E

View file

@ -16,6 +16,7 @@
package rife.bld.extension; package rife.bld.extension;
import org.assertj.core.api.AutoCloseableSoftAssertions;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import rife.bld.BaseProject; import rife.bld.BaseProject;
@ -90,15 +91,17 @@ class CheckstyleOperationTest {
.treeWithJavadoc(true) .treeWithJavadoc(true)
.executeConstructProcessCommandList(); .executeConstructProcessCommandList();
for (var p : args) { try (var softly = new AutoCloseableSoftAssertions()) {
var found = false; for (var p : args) {
for (var a : params) { var found = false;
if (a.startsWith(p)) { for (var a : params) {
found = true; if (a.startsWith(p)) {
break; found = true;
break;
}
} }
softly.assertThat(found).as(p + " not found.").isTrue();
} }
assertThat(found).as(p + " not found.").isTrue();
} }
} }