Remove ununsed methods.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 5 Jul 2011 12:21:37 +0000 (12:21 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 5 Jul 2011 12:21:37 +0000 (12:21 +0000)
Convert from using main() to a unit test
Use valid test data

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1143019 13f79535-47bb-0310-9956-ffa450edef68

test/org/apache/catalina/tribes/io/TestXByteBuffer.java

index 9704ccf..3773ae7 100644 (file)
@@ -19,20 +19,19 @@ package org.apache.catalina.tribes.io;
 import junit.framework.TestCase;
 
 public class TestXByteBuffer extends TestCase {
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-    
+
     public void testEmptyArray() throws Exception {
         // TODO
     }
 
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
+    public void testSerializationString() throws Exception {
+        String test = "This is as test.";
+        byte[] msg = XByteBuffer.serialize(test);
+        Object obj = XByteBuffer.deserialize(msg);
+        assertTrue(obj instanceof String);
+        assertEquals(test, obj);
     }
-    
+
     public static void main(String[] args) throws Exception {
         //XByteBuffer.deserialize(new byte[0]);
         XByteBuffer.deserialize(new byte[] {-84, -19, 0, 5, 115, 114, 0, 17, 106});