1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.surefire.its;
20
21 import java.util.Collection;
22
23 import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase;
24 import org.apache.maven.surefire.its.fixture.SurefireLauncher;
25 import org.junit.jupiter.params.ParameterizedTest;
26 import org.junit.jupiter.params.provider.MethodSource;
27
28 import static java.util.Arrays.asList;
29 import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_12;
30 import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_13;
31 import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_13_1;
32 import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_13_2;
33
34
35
36
37
38
39 public class JUnit4VersionsIT extends SurefireJUnit4IntegrationTestCase {
40
41 static Collection<Object[]> junitVersions() {
42 return asList(new Object[][] {{JUNIT_4_12}, {JUNIT_4_13}, {JUNIT_4_13_1}, {JUNIT_4_13_2}});
43 }
44
45 @ParameterizedTest(name = "{index}: JUnit {0}")
46 @MethodSource("junitVersions")
47 void testJunit(JUnitVersion version) {
48 version.configure(unpack(version)).executeTest().verifyErrorFree(1);
49 }
50
51 private SurefireLauncher unpack(JUnitVersion version) {
52 return unpack("/junit4", version.toString());
53 }
54 }