Search in sources :

Example 6 with ReplicatedMapEntryView

use of com.hazelcast.replicatedmap.impl.record.ReplicatedMapEntryView in project hazelcast by hazelcast.

the class PassThroughMapMergePolicyTest method merge_mergingNull.

@Test
public void merge_mergingNull() {
    ReplicatedMapEntryView existing = entryWithGivenValue(EXISTING);
    ReplicatedMapEntryView merging = null;
    assertEquals(EXISTING, policy.merge("map", merging, existing));
}
Also used : ReplicatedMapEntryView(com.hazelcast.replicatedmap.impl.record.ReplicatedMapEntryView) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 7 with ReplicatedMapEntryView

use of com.hazelcast.replicatedmap.impl.record.ReplicatedMapEntryView in project hazelcast by hazelcast.

the class PutIfAbsentMapMergePolicyTest method merge_existingValueAbsent.

@Test
public void merge_existingValueAbsent() {
    ReplicatedMapEntryView existing = entryWithGivenValue(null);
    ReplicatedMapEntryView merging = entryWithGivenValue(MERGING);
    assertEquals(MERGING, policy.merge("map", merging, existing));
}
Also used : ReplicatedMapEntryView(com.hazelcast.replicatedmap.impl.record.ReplicatedMapEntryView) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 8 with ReplicatedMapEntryView

use of com.hazelcast.replicatedmap.impl.record.ReplicatedMapEntryView in project hazelcast by hazelcast.

the class PutIfAbsentMapMergePolicyTest method merge_bothValuesNull.

@Test
public void merge_bothValuesNull() {
    ReplicatedMapEntryView existing = entryWithGivenValue(null);
    ReplicatedMapEntryView merging = entryWithGivenValue(null);
    assertNull(policy.merge("map", merging, existing));
}
Also used : ReplicatedMapEntryView(com.hazelcast.replicatedmap.impl.record.ReplicatedMapEntryView) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 9 with ReplicatedMapEntryView

use of com.hazelcast.replicatedmap.impl.record.ReplicatedMapEntryView in project hazelcast by hazelcast.

the class PutIfAbsentMapMergePolicyTest method merge_existingValuePresent.

@Test
public void merge_existingValuePresent() {
    ReplicatedMapEntryView existing = entryWithGivenValue(EXISTING);
    ReplicatedMapEntryView merging = entryWithGivenValue(MERGING);
    assertEquals(EXISTING, policy.merge("map", merging, existing));
}
Also used : ReplicatedMapEntryView(com.hazelcast.replicatedmap.impl.record.ReplicatedMapEntryView) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

ReplicatedMapEntryView (com.hazelcast.replicatedmap.impl.record.ReplicatedMapEntryView)9 Test (org.junit.Test)8 ParallelTest (com.hazelcast.test.annotation.ParallelTest)5 QuickTest (com.hazelcast.test.annotation.QuickTest)5 ArrayDataSerializableFactory (com.hazelcast.internal.serialization.impl.ArrayDataSerializableFactory)1 IdentifiedDataSerializable (com.hazelcast.nio.serialization.IdentifiedDataSerializable)1 RecordMigrationInfo (com.hazelcast.replicatedmap.impl.record.RecordMigrationInfo)1 ConstructorFunction (com.hazelcast.util.ConstructorFunction)1