Skip to content

Commit a4dcc9e

Browse files
committed
Remove old JUnit 3.x reference
1 parent 658625b commit a4dcc9e

File tree

3 files changed

+6
-31
lines changed

3 files changed

+6
-31
lines changed

pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,6 @@ under the License.
237237
<artifactId>junit-jupiter-api</artifactId>
238238
<scope>test</scope>
239239
</dependency>
240-
<dependency>
241-
<groupId>junit</groupId>
242-
<artifactId>junit</artifactId>
243-
<version>${junit4Version}</version>
244-
<scope>test</scope>
245-
</dependency>
246240
<dependency>
247241
<groupId>org.slf4j</groupId>
248242
<artifactId>slf4j-simple</artifactId>

src/it/MCOMPILER-170/mcompiler-170-1/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,16 @@
1818
*/
1919
package org.apache.maven.plugins.compiler.it;
2020

21-
import junit.framework.Test;
22-
import junit.framework.TestCase;
23-
import junit.framework.TestSuite;
21+
import org.junit.jupiter.api.Test;
2422

2523
/**
2624
* Unit test for simple App.
2725
*/
28-
public class AppTest extends TestCase {
29-
/**
30-
* Create the test case
31-
*
32-
* @param testName name of the test case
33-
*/
34-
public AppTest(String testName) {
35-
super(testName);
36-
}
37-
38-
/**
39-
* @return the suite of tests being tested
40-
*/
41-
public static Test suite() {
42-
return new TestSuite(AppTest.class);
43-
}
44-
26+
public class AppTest {
4527
/**
4628
* Rigourous Test :-)
4729
*/
30+
@Test
4831
public void testApp() {
4932
assertTrue(true);
5033
}

src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,11 @@ private static InternalSession createSession() {
486486
Path artifactFile;
487487
String localRepository = System.getProperty("localRepository");
488488
if (localRepository != null) {
489-
artifactFile = Paths.get(localRepository, "junit/junit/3.8.1/junit-3.8.1.jar");
489+
artifactFile = Paths.get(
490+
localRepository, "org/junit/jupiter/junit-jupiter-api/5.10.2/junit-jupiter-api-5.10.2.jar");
490491
} else {
491492
// for IDE
492-
String junitURI = junit.framework.Test.class
493-
.getResource("Test.class")
494-
.toURI()
495-
.toString();
493+
String junitURI = Test.class.getResource("Test.class").toURI().toString();
496494
junitURI = junitURI.substring("jar:".length(), junitURI.indexOf('!'));
497495
artifactFile = new File(URI.create(junitURI)).toPath();
498496
}

0 commit comments

Comments
 (0)