use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testDescendingContainsKey_NullPointerException.
/**
* containsKey(null) of empty map throws NPE
*/
@Test
public void testDescendingContainsKey_NullPointerException() {
try {
ConcurrentNavigableMap c = dmap5();
c.containsKey(null);
shouldThrow();
} catch (NullPointerException success) {
}
}
use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testDescendingContainsKey.
/**
* containsKey returns true for contained key
*/
@Test
public void testDescendingContainsKey() {
ConcurrentNavigableMap map = dmap5();
assertTrue(map.containsKey(m1));
assertFalse(map.containsKey(zero));
}
use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testDescendingReplace_NullPointerException.
/**
* replace(null, x) throws NPE
*/
@Test
public void testDescendingReplace_NullPointerException() {
try {
ConcurrentNavigableMap c = dmap5();
c.replace(null, "whatever");
shouldThrow();
} catch (NullPointerException success) {
}
}
use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method dmap5.
/**
* Returns a new map from Integers -5 to -1 to Strings "A"-"E".
*/
protected ConcurrentNavigableMap dmap5() {
ConcurrentNavigableMap map = emptyMap();
assertTrue(map.isEmpty());
map.put(m1, "A");
map.put(m5, "E");
map.put(m3, "C");
map.put(m2, "B");
map.put(m4, "D");
assertFalse(map.isEmpty());
assertEquals(5, map.size());
return map.descendingMap();
}
use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testContainsKey_NullPointerException.
/**
* containsKey(null) of nonempty map throws NPE
*/
@Test
public void testContainsKey_NullPointerException() {
try {
ConcurrentNavigableMap c = map5();
c.containsKey(null);
shouldThrow();
} catch (NullPointerException success) {
}
}
Aggregations