Skip to content

Commit 897dfc6

Browse files
committed
chore: migrate junit 3 test to junit4
Signed-off-by: Sandra Parsick <[email protected]>
1 parent 57c2923 commit 897dfc6

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

modello-maven-plugin/src/it/clone-java5/src/test/java/test/CloneTest.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44

55
import org.codehaus.plexus.util.xml.Xpp3Dom;
66

7-
import junit.framework.TestCase;
7+
import org.junit.Test;
8+
9+
import static org.junit.Assert.assertEquals;
10+
import static org.junit.Assert.assertNotNull;
11+
import static org.junit.Assert.assertNotSame;
812

913
public class CloneTest
10-
extends TestCase
1114
{
12-
15+
@Test
1316
public void testNullSafe()
1417
throws Exception
1518
{
@@ -20,7 +23,7 @@ public void testNullSafe()
2023
assertNotNull( copy );
2124
assertNotSame( orig, copy );
2225
}
23-
26+
@Test
2427
public void testClone()
2528
throws Exception
2629
{

modello-maven-plugin/src/it/clone/src/test/java/test/CloneTest.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44

55
import org.codehaus.plexus.util.xml.Xpp3Dom;
66

7-
import junit.framework.TestCase;
7+
import org.junit.Test;
8+
9+
import static org.junit.Assert.assertEquals;
10+
import static org.junit.Assert.assertNotNull;
11+
import static org.junit.Assert.assertNotSame;
812

913
public class CloneTest
10-
extends TestCase
1114
{
12-
15+
@Test
1316
public void testNullSafe()
1417
throws Exception
1518
{
@@ -20,7 +23,7 @@ public void testNullSafe()
2023
assertNotNull( copy );
2124
assertNotSame( orig, copy );
2225
}
23-
26+
@Test
2427
public void testClone()
2528
throws Exception
2629
{
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
package org.codehaus.modello.plugin.java.javasource;
22

3-
import junit.framework.TestCase;
3+
import org.junit.Test;
4+
5+
import static org.junit.Assert.assertEquals;
46

57
/**
68
* @author <a href="mailto:[email protected]">Simone Tripodi</a>
79
* @since 1.8
810
*/
9-
public final class JMapTypeTestCase extends TestCase {
11+
public final class JMapTypeTest {
1012

13+
@Test
1114
public void testJavaPropertiesType() {
1215
JMapType mapType = new JMapType("java.util.Properties", new JClass("String"));
1316

1417
assertEquals("java.util.Properties", mapType.toString());
1518
}
1619

20+
@Test
1721
public void testJavaMapType() {
1822
JMapType mapType = new JMapType("java.util.Map", new JClass("String"));
1923

2024
assertEquals("java.util.Map<Object, String>", mapType.toString());
2125
}
2226

27+
@Test
2328
public void testJavaMapInitialization() {
2429
JMapType mapType = new JMapType("java.util.Map", "new java.util.HashMap()", new JClass("String"));
2530

0 commit comments

Comments
 (0)