Author: kkolinko
Date: Tue Jan  5 14:16:54 2016
New Revision: 1723081

URL: http://svn.apache.org/viewvc?rev=1723081&view=rev
Log:
Convert the test to JUnit 4.

Modified:
    
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/membership/TestMemberImplSerialization.java

Modified: 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/membership/TestMemberImplSerialization.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/membership/TestMemberImplSerialization.java?rev=1723081&r1=1723080&r2=1723081&view=diff
==============================================================================
--- 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/membership/TestMemberImplSerialization.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/membership/TestMemberImplSerialization.java
 Tue Jan  5 14:16:54 2016
@@ -15,9 +15,14 @@
  */
 package org.apache.catalina.tribes.membership;
 
-import junit.framework.TestCase;
 import java.util.Arrays;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Before;
+import org.junit.Test;
+
 /**
  * <p>Title: </p>
  *
@@ -28,11 +33,12 @@ import java.util.Arrays;
  * @author not attributable
  * @version 1.0
  */
-public class TestMemberImplSerialization extends TestCase {
-    MemberImpl m1, m2, p1,p2;
-    byte[] payload = null;
-    protected void setUp() throws Exception {
-        super.setUp();
+public class TestMemberImplSerialization {
+    private MemberImpl m1, m2, p1,p2;
+    private byte[] payload = null;
+
+    @Before
+    public void setUp() throws Exception {
         payload = new byte[333];
         Arrays.fill(payload,(byte)1);
         m1 = new MemberImpl("localhost",3333,1,payload);
@@ -46,7 +52,8 @@ public class TestMemberImplSerialization
         m1.setCommand(new byte[] {1,2,4,5,6,7,8,9});
         m2.setCommand(new byte[] {1,2,4,5,6,7,8,9});
     }
-    
+
+    @Test
     public void testCompare() throws Exception {
         assertTrue(m1.equals(m2));
         assertTrue(m2.equals(m1));
@@ -56,7 +63,8 @@ public class TestMemberImplSerialization
         assertFalse(m2.equals(p2));
         assertFalse(p1.equals(p2));
     }
-    
+
+    @Test
     public void testSerializationOne() throws Exception {
         MemberImpl m = m1;
         byte[] md1 = m.getData(false,true);
@@ -91,8 +99,4 @@ public class TestMemberImplSerialization
         return result;
     }
 
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to