use of com.hazelcast.core.MultiMap in project hazelcast by hazelcast.
the class ClientMultiMapTest method testContainsValue_whenExists.
@Test
public void testContainsValue_whenExists() {
final MultiMap mm = client.getMultiMap(randomString());
mm.put("key1", "value1");
assertTrue(mm.containsValue("value1"));
assertFalse(mm.containsValue("NOT_THERE"));
}
use of com.hazelcast.core.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.core.MultiMap in project hazelcast by hazelcast.
the class ClientMultiMapTest method testPut_withNullValue.
@Test(expected = NullPointerException.class)
public void testPut_withNullValue() {
Object key = "key";
final MultiMap mm = client.getMultiMap(randomString());
mm.put(key, null);
}
use of com.hazelcast.core.MultiMap in project hazelcast by hazelcast.
the class ClientMultiMapTest method testGet_whenNotExist.
@Test
public void testGet_whenNotExist() {
final MultiMap mm = client.getMultiMap(randomString());
Collection coll = mm.get("NOT_THERE");
assertTrue(coll.isEmpty());
}
use of com.hazelcast.core.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());
}
Aggregations