use of example.serialization.EmployeeDTO in project hazelcast by hazelcast.
the class CompactStreamSerializerTest method testDefaultsReflection_nested.
@Test
public void testDefaultsReflection_nested() {
SerializationService serializationService = createSerializationService();
EmployeeDTO employeeDTO = new EmployeeDTO(30, 102310312);
long[] ids = new long[2];
ids[0] = 22;
ids[1] = 44;
EmployeeDTO[] employeeDTOS = new EmployeeDTO[5];
for (int j = 0; j < employeeDTOS.length; j++) {
employeeDTOS[j] = new EmployeeDTO(20 + j, j * 100);
}
EmployerDTO employerDTO = new EmployerDTO("nbss", 40, HIRING, ids, employeeDTO, employeeDTOS);
Data data = serializationService.toData(employerDTO);
Object object = serializationService.toObject(data);
EmployerDTO o = (EmployerDTO) object;
assertEquals(employerDTO, o);
}
Aggregations