Skip to content

Commit eb4ffab

Browse files
authored
chore: migrate/delete junit 3 tests (#425)
Signed-off-by: Sandra Parsick <[email protected]>
1 parent 888175f commit eb4ffab

File tree

4 files changed

+20
-92
lines changed

4 files changed

+20
-92
lines changed

src/it/MRESOURCES-131/pom.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@
2525
<version>1.0-SNAPSHOT</version>
2626
<packaging>jar</packaging>
2727

28-
<dependencies>
29-
<dependency>
30-
<groupId>junit</groupId>
31-
<artifactId>junit</artifactId>
32-
<version>3.8.1</version>
33-
<scope>test</scope>
34-
</dependency>
35-
</dependencies>
36-
3728
<build>
3829
<pluginManagement>
3930
<plugins>

src/it/MRESOURCES-131/src/test/java/org/apache/maven/plugins/resources/it/AppTest.java

Lines changed: 0 additions & 70 deletions
This file was deleted.

src/it/MRESOURCES-18/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ under the License.
3333

3434
<dependencies>
3535
<dependency>
36-
<groupId>junit</groupId>
37-
<artifactId>junit</artifactId>
38-
<version>3.8.1</version>
39-
<type>jar</type>
36+
<groupId>org.junit.jupiter</groupId>
37+
<artifactId>junit-jupiter</artifactId>
38+
<version>5.14.0</version>
4039
<scope>test</scope>
4140
</dependency>
4241
</dependencies>

src/it/MRESOURCES-18/src/test/java/org/apache/maven/it0105/FilterTest.java

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,19 @@
4242
import java.io.IOException;
4343
import java.util.Properties;
4444

45-
import junit.framework.TestCase;
45+
import org.junit.jupiter.api.BeforeEach;
46+
import org.junit.jupiter.api.Test;
4647

47-
public class FilterTest extends TestCase {
48+
import static org.junit.jupiter.api.Assertions.assertEquals;
49+
import static org.junit.jupiter.api.Assertions.assertTrue;
50+
51+
public class FilterTest {
4852
private String basedir;
4953

5054
private Properties properties;
5155

52-
protected void setUp() throws Exception {
56+
@BeforeEach
57+
void setUp() throws Exception {
5358
basedir = System.getProperty("basedir");
5459

5560
properties = new Properties();
@@ -61,15 +66,18 @@ protected void setUp() throws Exception {
6166
properties.load(new FileInputStream(testPropertiesFile));
6267
}
6368

64-
public void testSystemPropertyInterpolation() throws IOException {
65-
assertEquals("System property", System.getProperty("java.version"), properties.getProperty("system.property"));
69+
@Test
70+
void testSystemPropertyInterpolation() throws IOException {
71+
assertEquals(System.getProperty("java.version"), properties.getProperty("system.property"), "System property");
6672
}
6773

68-
public void testCommandLineParameterInterpolation() throws IOException {
69-
assertEquals("CLI Parameter", "CLI", properties.getProperty("cli.param"));
74+
@Test
75+
void testCommandLineParameterInterpolation() throws IOException {
76+
assertEquals("CLI", properties.getProperty("cli.param"), "CLI Parameter");
7077
}
7178

72-
public void testPomPropertyInterpolation() throws IOException {
73-
assertEquals("Pom Property", "foo", properties.getProperty("pom.property"));
79+
@Test
80+
void testPomPropertyInterpolation() throws IOException {
81+
assertEquals("foo", properties.getProperty("pom.property"), "Pom Property");
7482
}
7583
}

0 commit comments

Comments
 (0)