use of com.hazelcast.client.test.PortableFactory in project hazelcast by hazelcast.
the class ClientConfigTest method testAccessSerializationConfigOverClientInstance.
@Test
public void testAccessSerializationConfigOverClientInstance() {
hazelcastFactory.newHazelcastInstance();
ClientConfig clientConfig = new ClientConfig();
clientConfig.getSerializationConfig().addPortableFactory(PortableFactory.FACTORY_ID, new PortableFactory());
HazelcastInstance client = hazelcastFactory.newHazelcastClient(clientConfig);
SerializationConfig serializationConfig = client.getConfig().getSerializationConfig();
Map<Integer, com.hazelcast.nio.serialization.PortableFactory> factories = serializationConfig.getPortableFactories();
assertEquals(1, factories.size());
assertEquals(factories.get(PortableFactory.FACTORY_ID).create(Employee.CLASS_ID).getClassId(), Employee.CLASS_ID);
}
Aggregations