updated test cases

This commit is contained in:
Rob Austin
2014-12-22 14:44:54 +00:00
parent 0b765451a8
commit 7ad50e64ea
9 changed files with 518 additions and 242 deletions
@@ -28,6 +28,7 @@ import org.junit.Test;
import java.io.*;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.concurrent.ExecutionException;
import static org.junit.Assert.assertEquals;
@@ -47,6 +48,23 @@ public class SerializerTest {
}
@Test
public void testStringSerialization() throws ExecutionException,
InterruptedException, IOException {
ByteBufferBytes b = new ByteBufferBytes(ByteBuffer.allocate(512));
String expected = "Hello";
b.writeObject(expected);
b.clear();
String actual = (String) b.readObject();
assertEquals(expected, actual);
}
@Test
public void testValueMarshallable() throws Exception {
testReadWriteValue("Test");