Skip to content

Commit

Permalink
Merge pull request #70 from davidburstrom/master-fix-69
Browse files Browse the repository at this point in the history
Build with JUnit Platform 1.9.1 to support JUnit Jupiter 5.9.1 #69
  • Loading branch information
hcoles committed Sep 26, 2022
2 parents 377f845 + bc6260e commit 758ce38
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<assertj.version>3.14.0</assertj.version>
<junit.platform.version>1.8.2</junit.platform.version>
<junit.platform.version>1.9.1</junit.platform.version>
<junit.version>5.8.2</junit.version>
<mockito.version>2.7.6</mockito.version>
<pitest.version>1.9.0</pitest.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void detectsErroringTestsWhenPassingTestsPresent() {

@Test
void findsAndRunsParameterizedTests() {
findsAndRunsNTests(1, TestClassWithParameterizedTestAnnotation.class);
findsAndRunsNTests(2, TestClassWithParameterizedTestAnnotation.class);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,31 @@
*/
package org.pitest.junit5.repository;

import java.util.stream.Stream;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.junit.jupiter.params.provider.ValueSource;

/**
*
* @author Tobias Stadler
*/
public class TestClassWithParameterizedTestAnnotation {

@ParameterizedTest
@ValueSource(strings = {"foo"})
public void parameterizedTest(String string) {

}


@ParameterizedTest
@MethodSource("someMethod")
public void methodParameterizedTest(String string) {

}

static Stream<Arguments> someMethod() {
return Stream.of(Arguments.of("foo"));
}
}

0 comments on commit 758ce38

Please sign in to comment.