use of com.hazelcast.test.starter.constructor.ConfigConstructor in project hazelcast by hazelcast.
the class ConfigConstructorTest method testConstructor.
@Test
public void testConstructor() {
Config config = new Config().setInstanceName("myInstanceName").addMapConfig(new MapConfig("myMap")).addListConfig(new ListConfig("myList")).addListenerConfig(new ListenerConfig("com.hazelcast.test.MyListenerConfig")).setProperties(buildPropertiesWithDefaults());
ConfigConstructor constructor = new ConfigConstructor(Config.class);
Config clonedConfig = (Config) constructor.createNew(config);
assertEquals(config.getInstanceName(), clonedConfig.getInstanceName());
assertEquals(config.getMapConfigs().size(), clonedConfig.getMapConfigs().size());
assertEquals(config.getListConfigs().size(), clonedConfig.getListConfigs().size());
assertEquals(config.getListenerConfigs().size(), clonedConfig.getListenerConfigs().size());
assertPropertiesEquals(config.getProperties(), clonedConfig.getProperties());
}
Aggregations