mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
updated test cases
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user