use of com.hazelcast.nio.serialization.SerializationConcurrencyTest.Person in project hazelcast by hazelcast.
the class SerializationTest method testArrayListSerialization.
@Test
public void testArrayListSerialization() {
SerializationService ss = new DefaultSerializationServiceBuilder().build();
ArrayList<Person> arrayList = new ArrayList<Person>();
arrayList.add(new Person(35, 180, 100, "Orhan", null));
arrayList.add(new Person(12, 120, 60, "Osman", null));
Data data = ss.toData(arrayList);
ArrayList deserialized = ss.toObject(data);
assertTrue("Objects are not identical!", arrayList.equals(deserialized));
}
use of com.hazelcast.nio.serialization.SerializationConcurrencyTest.Person in project hazelcast by hazelcast.
the class SerializationTest method testLinkedListSerialization.
@Test
public void testLinkedListSerialization() {
SerializationService ss = new DefaultSerializationServiceBuilder().build();
LinkedList<Person> linkedList = new LinkedList<Person>();
linkedList.add(new Person(35, 180, 100, "Orhan", null));
linkedList.add(new Person(12, 120, 60, "Osman", null));
Data data = ss.toData(linkedList);
LinkedList deserialized = ss.toObject(data);
assertTrue("Objects are not identical!", linkedList.equals(deserialized));
}
Aggregations