use of com.hazelcast.multimap.MultiMap in project hazelcast by hazelcast.
the class ClientMultiMapTest method testEmptyKeySet.
@Test
public void testEmptyKeySet() {
final MultiMap mm = client.getMultiMap(randomString());
assertEquals(Collections.EMPTY_SET, mm.keySet());
}
use of com.hazelcast.multimap.MultiMap in project hazelcast by hazelcast.
the class ClientMultiMapTest method testEntrySet.
@Test
public void testEntrySet() {
final int maxKeys = 14;
final int maxValues = 3;
final MultiMap mm = client.getMultiMap(randomString());
for (int key = 0; key < maxKeys; key++) {
for (int val = 0; val < maxValues; val++) {
mm.put(key, val);
}
}
assertEquals(maxKeys * maxValues, mm.entrySet().size());
}
use of com.hazelcast.multimap.MultiMap in project hazelcast by hazelcast.
the class ClientMultiMapTest method testContainsKey_whenKeyNull.
@Test(expected = NullPointerException.class)
public void testContainsKey_whenKeyNull() {
final MultiMap mm = client.getMultiMap(randomString());
mm.containsKey(null);
}
use of com.hazelcast.multimap.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.multimap.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