From: markt Date: Tue, 5 Jul 2011 12:21:37 +0000 (+0000) Subject: Remove ununsed methods. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f5773ff4312fb3802c615bd5800969baec4b9a86;p=tomcat7.0 Remove ununsed methods. 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 --- diff --git a/test/org/apache/catalina/tribes/io/TestXByteBuffer.java b/test/org/apache/catalina/tribes/io/TestXByteBuffer.java index 9704ccf9c..3773ae741 100644 --- a/test/org/apache/catalina/tribes/io/TestXByteBuffer.java +++ b/test/org/apache/catalina/tribes/io/TestXByteBuffer.java @@ -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});