Skip to content

Commit 393d873

Browse files
committed
Added soft assertions for parameters check
1 parent fd54c6b commit 393d873

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/test/java/rife/bld/extension/PitestOperationTest.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package rife.bld.extension;
1818

19+
import org.assertj.core.api.AutoCloseableSoftAssertions;
1920
import org.junit.jupiter.api.Test;
2021
import rife.bld.BaseProject;
2122
import rife.bld.Project;
@@ -121,15 +122,17 @@ void checkAllParameters() throws IOException {
121122
.verbosity("default")
122123
.executeConstructProcessCommandList();
123124

124-
for (var p : args) {
125-
var found = false;
126-
for (var a : params) {
127-
if (a.startsWith(p)) {
128-
found = true;
129-
break;
125+
try (var softly = new AutoCloseableSoftAssertions()) {
126+
for (var p : args) {
127+
var found = false;
128+
for (var a : params) {
129+
if (a.startsWith(p)) {
130+
found = true;
131+
break;
132+
}
130133
}
134+
softly.assertThat(found).as(p + " not found.").isTrue();
131135
}
132-
assertThat(found).as(p + " not found.").isTrue();
133136
}
134137
}
135138

0 commit comments

Comments
 (0)