use of com.hazelcast.core.MultiMap in project hazelcast by hazelcast.
the class ClientMultiMapTest method testKeySet.
@Test
public void testKeySet() {
final int maxKeys = 23;
final MultiMap mm = client.getMultiMap(randomString());
Set expected = new TreeSet();
for (int key = 0; key < maxKeys; key++) {
mm.put(key, 1);
expected.add(key);
}
assertEquals(expected, mm.keySet());
}
use of com.hazelcast.core.MultiMap in project hazelcast by hazelcast.
the class ClientMultiMapTest method testContainsValue_whenSearchValueNull.
@Test(expected = NullPointerException.class)
public void testContainsValue_whenSearchValueNull() {
final MultiMap mm = client.getMultiMap(randomString());
mm.containsValue(null);
}
use of com.hazelcast.core.MultiMap in project hazelcast by hazelcast.
the class ClientMultiMapTest method testContainsEntry.
@Test
public void testContainsEntry() {
final MultiMap mm = client.getMultiMap(randomString());
mm.put("key1", "value1");
assertTrue(mm.containsEntry("key1", "value1"));
assertFalse(mm.containsEntry("key1", "NOT_THERE"));
assertFalse(mm.containsEntry("NOT_THERE", "NOT_THERE"));
assertFalse(mm.containsEntry("NOT_THERE", "value1"));
}
use of com.hazelcast.core.MultiMap in project hazelcast by hazelcast.
the class ClientMultiMapTest method testLocalKeySet.
@Test(expected = UnsupportedOperationException.class)
public void testLocalKeySet() {
final MultiMap mm = client.getMultiMap(randomString());
mm.localKeySet();
}
use of com.hazelcast.core.MultiMap in project hazelcast by hazelcast.
the class ClientMultiMapTest method testValueCount.
@Test
public void testValueCount() {
final Object key = "key1";
final MultiMap mm = client.getMultiMap(randomString());
mm.put(key, 1);
mm.put(key, 2);
assertEquals(2, mm.valueCount(key));
}
Aggregations