Skip to content

Commit

Permalink
Added soft assertions for parameters check
Browse files Browse the repository at this point in the history
  • Loading branch information
ethauvin committed Sep 2, 2024
1 parent fd54c6b commit 393d873
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/test/java/rife/bld/extension/PitestOperationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package rife.bld.extension;

import org.assertj.core.api.AutoCloseableSoftAssertions;
import org.junit.jupiter.api.Test;
import rife.bld.BaseProject;
import rife.bld.Project;
Expand Down Expand Up @@ -121,15 +122,17 @@ void checkAllParameters() throws IOException {
.verbosity("default")
.executeConstructProcessCommandList();

for (var p : args) {
var found = false;
for (var a : params) {
if (a.startsWith(p)) {
found = true;
break;
try (var softly = new AutoCloseableSoftAssertions()) {
for (var p : args) {
var found = false;
for (var a : params) {
if (a.startsWith(p)) {
found = true;
break;
}
}
softly.assertThat(found).as(p + " not found.").isTrue();
}
assertThat(found).as(p + " not found.").isTrue();
}
}

Expand Down

0 comments on commit 393d873

Please sign in to comment.