Skip to content

Commit

Permalink
Use @test for single parameter test
Browse files Browse the repository at this point in the history
  • Loading branch information
yhkuo41 committed Oct 16, 2024
1 parent 6e8b61f commit c4e4716
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,11 @@ void executeWithExcludeClassnameOptionExcludesClasses(final String line) {
);
}

@ParameterizedTest
@ValueSource(strings = { //
"-e junit-jupiter -p org.junit.platform.console.subpackage --exclude-methodname"
+ " ^org\\.junit\\.platform\\.console\\.subpackage\\..+#test" //
})
void executeWithExcludeMethodNameOptionExcludesMethods(final String line) {
String[] args = line.split(" ");
@Test
void executeWithExcludeMethodNameOptionExcludesMethods() {
var line = "execute -e junit-jupiter -p org.junit.platform.console.subpackage --exclude-methodname"
+ " ^org\\.junit\\.platform\\.console\\.subpackage\\..+#test";
var args = line.split(" ");
var result = new ConsoleLauncherWrapper().execute(args);
assertAll("all subpackage test methods are excluded by the method name filter", //
() -> assertArrayEquals(args, result.args), //
Expand Down

0 comments on commit c4e4716

Please sign in to comment.