Skip to content

Commit

Permalink
gradle spotlessApply
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasJebing committed Oct 23, 2024
1 parent edd9f46 commit beb53ab
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1120,26 +1120,26 @@ void failsWithArgumentsSourceProvidingUnusedArguments() {
var results = execute(ArgumentCountValidationMode.STRICT, UnusedArgumentsTestCase.class,
"testWithTwoUnusedStringArgumentsProvider", String.class);
results.allEvents().assertThatEvents() //
.haveExactly(1, event(EventConditions.finishedWithFailure(message(
String.format("Configuration error: the @ParameterizedTest has 1 argument(s) but there were 2 argument(s) provided.%nNote: the provided arguments are [foo, unused1]")))));
.haveExactly(1, event(EventConditions.finishedWithFailure(message(String.format(
"Configuration error: the @ParameterizedTest has 1 argument(s) but there were 2 argument(s) provided.%nNote: the provided arguments are [foo, unused1]")))));
}

@Test
void failsWithMethodSourceProvidingUnusedArguments() {
var results = execute(ArgumentCountValidationMode.STRICT, UnusedArgumentsTestCase.class,
"testWithMethodSourceProvidingUnusedArguments", String.class);
results.allEvents().assertThatEvents() //
.haveExactly(1, event(EventConditions.finishedWithFailure(message(
String.format("Configuration error: the @ParameterizedTest has 1 argument(s) but there were 2 argument(s) provided.%nNote: the provided arguments are [foo, unused1]")))));
.haveExactly(1, event(EventConditions.finishedWithFailure(message(String.format(
"Configuration error: the @ParameterizedTest has 1 argument(s) but there were 2 argument(s) provided.%nNote: the provided arguments are [foo, unused1]")))));
}

@Test
void failsWithCsvSourceUnusedArgumentsAndStrictArgumentCountValidationAnnotationAttribute() {
var results = execute(ArgumentCountValidationMode.NONE, UnusedArgumentsTestCase.class,
"testWithStrictArgumentCountValidation", String.class);
results.allEvents().assertThatEvents() //
.haveExactly(1, event(EventConditions.finishedWithFailure(message(
String.format("Configuration error: the @ParameterizedTest has 1 argument(s) but there were 2 argument(s) provided.%nNote: the provided arguments are [foo, unused1]")))));
.haveExactly(1, event(EventConditions.finishedWithFailure(message(String.format(
"Configuration error: the @ParameterizedTest has 1 argument(s) but there were 2 argument(s) provided.%nNote: the provided arguments are [foo, unused1]")))));
}

@Test
Expand Down

0 comments on commit beb53ab

Please sign in to comment.