Skip to content

Commit 694dd2f

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

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
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;
12+
import static org.junit.Assert.assertSame;
813

914
public class CloneTest
10-
extends TestCase
1115
{
12-
16+
@Test
1317
public void testNullSafe()
1418
throws Exception
1519
{
@@ -20,7 +24,7 @@ public void testNullSafe()
2024
assertNotNull( copy );
2125
assertNotSame( orig, copy );
2226
}
23-
27+
@Test
2428
public void testClone()
2529
throws Exception
2630
{

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
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;
12+
import static org.junit.Assert.assertSame;
813

914
public class CloneTest
10-
extends TestCase
1115
{
12-
16+
@Test
1317
public void testNullSafe()
1418
throws Exception
1519
{
@@ -20,7 +24,7 @@ public void testNullSafe()
2024
assertNotNull( copy );
2125
assertNotSame( orig, copy );
2226
}
23-
27+
@Test
2428
public void testClone()
2529
throws Exception
2630
{
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)