use of com.hazelcast.internal.config.MapConfigReadOnly in project hazelcast by hazelcast.
the class MapConfigReadOnlyTest method getNearCacheConfigOfReadOnlyMapConfigShouldReturnNullIfConfigIsNull.
@Test
public void getNearCacheConfigOfReadOnlyMapConfigShouldReturnNullIfConfigIsNull() {
MapConfig config = new MapConfig().setNearCacheConfig(null);
NearCacheConfig nearCacheConfig = new MapConfigReadOnly(config).getNearCacheConfig();
assertNull(nearCacheConfig);
}
use of com.hazelcast.internal.config.MapConfigReadOnly in project hazelcast by hazelcast.
the class MapConfigReadOnlyTest method getQueryCacheConfigsOfReadOnlyMapConfigShouldReturnUnmodifiable.
@Test(expected = UnsupportedOperationException.class)
public void getQueryCacheConfigsOfReadOnlyMapConfigShouldReturnUnmodifiable() {
MapConfig config = new MapConfig().addQueryCacheConfig(new QueryCacheConfig("myQueryCache1")).addQueryCacheConfig(new QueryCacheConfig("myQueryCache2"));
List<QueryCacheConfig> queryCacheConfigs = new MapConfigReadOnly(config).getQueryCacheConfigs();
queryCacheConfigs.add(new QueryCacheConfig("myQueryCache3"));
}
use of com.hazelcast.internal.config.MapConfigReadOnly in project hazelcast by hazelcast.
the class MapConfigReadOnlyTest method getNearCacheConfigOfReadOnlyMapConfigShouldReturnUnmodifiable.
@Test(expected = UnsupportedOperationException.class)
public void getNearCacheConfigOfReadOnlyMapConfigShouldReturnUnmodifiable() {
MapConfig config = new MapConfig().setNearCacheConfig(new NearCacheConfig());
NearCacheConfig nearCacheConfig = new MapConfigReadOnly(config).getNearCacheConfig();
nearCacheConfig.setName("myNearCache");
}
use of com.hazelcast.internal.config.MapConfigReadOnly in project hazelcast by hazelcast.
the class MapConfigReadOnlyTest method getPartitioningStrategyConfigOfReadOnlyMapConfigShouldReturnNullIfConfigIsNull.
@Test
public void getPartitioningStrategyConfigOfReadOnlyMapConfigShouldReturnNullIfConfigIsNull() {
MapConfig config = new MapConfig().setPartitioningStrategyConfig(null);
PartitioningStrategyConfig partitioningStrategyConfig = new MapConfigReadOnly(config).getPartitioningStrategyConfig();
assertNull(partitioningStrategyConfig);
}
use of com.hazelcast.internal.config.MapConfigReadOnly in project hazelcast by hazelcast.
the class MapConfigReadOnlyTest method getPartitioningStrategyConfigOfReadOnlyMapConfigShouldReturnUnmodifiable.
@Test(expected = UnsupportedOperationException.class)
public void getPartitioningStrategyConfigOfReadOnlyMapConfigShouldReturnUnmodifiable() {
MapConfig config = new MapConfig().setPartitioningStrategyConfig(new PartitioningStrategyConfig());
PartitioningStrategyConfig partitioningStrategyConfig = new MapConfigReadOnly(config).getPartitioningStrategyConfig();
partitioningStrategyConfig.setPartitioningStrategy(null);
}
Aggregations