use of com.hazelcast.multimap.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.multimap.MultiMap in project hazelcast by hazelcast.
the class ClientMultiMapTest method testPut_WithExistingKeyValue.
@Test
public void testPut_WithExistingKeyValue() {
final Object key = "key1";
final MultiMap mm = client.getMultiMap(randomString());
assertTrue(mm.put(key, 1));
assertFalse(mm.put(key, 1));
}
use of com.hazelcast.multimap.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.multimap.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.multimap.MultiMap in project hazelcast by hazelcast.
the class ClientMultiMapTest method testContainsKey_whenKeyExists.
@Test
public void testContainsKey_whenKeyExists() {
final MultiMap mm = client.getMultiMap(randomString());
mm.put("key1", "value1");
assertTrue(mm.containsKey("key1"));
}
Aggregations