Author: markt Date: Tue Jul 5 12:21:37 2011 New Revision: 1143019 URL: http://svn.apache.org/viewvc?rev=1143019&view=rev Log: Remove ununsed methods. Convert from using main() to a unit test Use valid test data
Modified: tomcat/trunk/test/org/apache/catalina/tribes/io/TestXByteBuffer.java Modified: tomcat/trunk/test/org/apache/catalina/tribes/io/TestXByteBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/io/TestXByteBuffer.java?rev=1143019&r1=1143018&r2=1143019&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/catalina/tribes/io/TestXByteBuffer.java (original) +++ tomcat/trunk/test/org/apache/catalina/tribes/io/TestXByteBuffer.java Tue Jul 5 12:21:37 2011 @@ -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}); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org