use of com.hazelcast.config.GlobalSerializerConfig in project hazelcast by hazelcast.
the class TestFullApplicationContext method testSerializationConfig.
@Test
public void testSerializationConfig() {
SerializationConfig serializationConfig = config.getSerializationConfig();
assertEquals(ByteOrder.BIG_ENDIAN, serializationConfig.getByteOrder());
assertEquals(false, serializationConfig.isCheckClassDefErrors());
assertEquals(13, serializationConfig.getPortableVersion());
Map<Integer, String> dataSerializableFactoryClasses = serializationConfig.getDataSerializableFactoryClasses();
assertFalse(dataSerializableFactoryClasses.isEmpty());
assertEquals(DummyDataSerializableFactory.class.getName(), dataSerializableFactoryClasses.get(1));
Map<Integer, DataSerializableFactory> dataSerializableFactories = serializationConfig.getDataSerializableFactories();
assertFalse(dataSerializableFactories.isEmpty());
assertEquals(DummyDataSerializableFactory.class, dataSerializableFactories.get(2).getClass());
Map<Integer, String> portableFactoryClasses = serializationConfig.getPortableFactoryClasses();
assertFalse(portableFactoryClasses.isEmpty());
assertEquals(DummyPortableFactory.class.getName(), portableFactoryClasses.get(1));
Map<Integer, PortableFactory> portableFactories = serializationConfig.getPortableFactories();
assertFalse(portableFactories.isEmpty());
assertEquals(DummyPortableFactory.class, portableFactories.get(2).getClass());
Collection<SerializerConfig> serializerConfigs = serializationConfig.getSerializerConfigs();
assertFalse(serializerConfigs.isEmpty());
GlobalSerializerConfig globalSerializerConfig = serializationConfig.getGlobalSerializerConfig();
assertNotNull(globalSerializerConfig);
assertEquals(dummySerializer, globalSerializerConfig.getImplementation());
}
Aggregations