Search in sources :

Example 1 with CachePartitionLostListenerConfigReadOnly

use of com.hazelcast.internal.config.CachePartitionLostListenerConfigReadOnly in project hazelcast by hazelcast.

the class CachePartitionLostListenerConfigTest method testCachePartitionLostListenerReadOnlyConfig_withClassName.

@Test(expected = UnsupportedOperationException.class)
public void testCachePartitionLostListenerReadOnlyConfig_withClassName() {
    CachePartitionLostListenerConfigReadOnly readOnly = new CachePartitionLostListenerConfigReadOnly(new CachePartitionLostListenerConfig());
    readOnly.setClassName("com.hz");
}
Also used : CachePartitionLostListenerConfig(com.hazelcast.config.CachePartitionLostListenerConfig) CachePartitionLostListenerConfigReadOnly(com.hazelcast.internal.config.CachePartitionLostListenerConfigReadOnly) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 2 with CachePartitionLostListenerConfigReadOnly

use of com.hazelcast.internal.config.CachePartitionLostListenerConfigReadOnly in project hazelcast by hazelcast.

the class CachePartitionLostListenerConfigTest method testCachePartitionLostListenerReadOnlyConfig_withEventListenerImplementation.

@Test(expected = UnsupportedOperationException.class)
public void testCachePartitionLostListenerReadOnlyConfig_withEventListenerImplementation() {
    CachePartitionLostListenerConfigReadOnly readOnly = new CachePartitionLostListenerConfigReadOnly(new CachePartitionLostListenerConfig());
    readOnly.setImplementation(mock(EventListener.class));
}
Also used : CachePartitionLostListenerConfig(com.hazelcast.config.CachePartitionLostListenerConfig) CachePartitionLostListenerConfigReadOnly(com.hazelcast.internal.config.CachePartitionLostListenerConfigReadOnly) EventListener(java.util.EventListener) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 3 with CachePartitionLostListenerConfigReadOnly

use of com.hazelcast.internal.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 = new CachePartitionLostListenerConfigReadOnly(listenerConfig);
    assertEquals(listener, readOnly.getImplementation());
    readOnly.setImplementation(mock(CachePartitionLostListener.class));
}
Also used : EventCollectingCachePartitionLostListener(com.hazelcast.cache.CachePartitionLostListenerTest.EventCollectingCachePartitionLostListener) CachePartitionLostListener(com.hazelcast.cache.impl.event.CachePartitionLostListener) CachePartitionLostListenerConfig(com.hazelcast.config.CachePartitionLostListenerConfig) CachePartitionLostListenerConfigReadOnly(com.hazelcast.internal.config.CachePartitionLostListenerConfigReadOnly) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

CachePartitionLostListenerConfig (com.hazelcast.config.CachePartitionLostListenerConfig)3 CachePartitionLostListenerConfigReadOnly (com.hazelcast.internal.config.CachePartitionLostListenerConfigReadOnly)3 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)3 QuickTest (com.hazelcast.test.annotation.QuickTest)3 Test (org.junit.Test)3 EventCollectingCachePartitionLostListener (com.hazelcast.cache.CachePartitionLostListenerTest.EventCollectingCachePartitionLostListener)1 CachePartitionLostListener (com.hazelcast.cache.impl.event.CachePartitionLostListener)1 EventListener (java.util.EventListener)1