use of com.hazelcast.config.CachePartitionLostListenerConfigReadOnly in project hazelcast by hazelcast.
the class CachePartitionLostListenerConfigTest method testCachePartitionLostListenerReadOnlyConfig_withImplementation.
@Test(expected = UnsupportedOperationException.class)
public void testCachePartitionLostListenerReadOnlyConfig_withImplementation() {
CachePartitionLostListener listener = mock(CachePartitionLostListener.class);
CachePartitionLostListenerConfig listenerConfig = new CachePartitionLostListenerConfig(listener);
CachePartitionLostListenerConfigReadOnly readOnly = listenerConfig.getAsReadOnly();
assertEquals(listener, readOnly.getImplementation());
readOnly.setImplementation(mock(CachePartitionLostListener.class));
}
use of com.hazelcast.config.CachePartitionLostListenerConfigReadOnly in project hazelcast by hazelcast.
the class CachePartitionLostListenerConfigTest method testCachePartitionLostListenerReadOnlyConfig_withEventListenerImplementation.
@Test(expected = UnsupportedOperationException.class)
public void testCachePartitionLostListenerReadOnlyConfig_withEventListenerImplementation() {
CachePartitionLostListenerConfigReadOnly readOnly = new CachePartitionLostListenerConfig().getAsReadOnly();
readOnly.setImplementation(mock(EventListener.class));
}
use of com.hazelcast.config.CachePartitionLostListenerConfigReadOnly in project hazelcast by hazelcast.
the class CachePartitionLostListenerConfigTest method testCachePartitionLostListenerReadOnlyConfig_withClassName.
@Test(expected = UnsupportedOperationException.class)
public void testCachePartitionLostListenerReadOnlyConfig_withClassName() {
CachePartitionLostListenerConfigReadOnly readOnly = new CachePartitionLostListenerConfig().getAsReadOnly();
readOnly.setClassName("com.hz");
}
Aggregations