use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testDescendingPut1_NullPointerException.
/**
* put(null,x) throws NPE
*/
@Test
public void testDescendingPut1_NullPointerException() {
try {
ConcurrentNavigableMap c = dmap5();
c.put(null, "whatever");
shouldThrow();
} catch (NullPointerException success) {
}
}
use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testLowerEntry.
/**
* lowerEntry returns preceding entry.
*/
@Test
public void testLowerEntry() {
ConcurrentNavigableMap map = map5();
Map.Entry e1 = map.lowerEntry(three);
assertEquals(two, e1.getKey());
Map.Entry e2 = map.lowerEntry(six);
assertEquals(five, e2.getKey());
Map.Entry e3 = map.lowerEntry(one);
assertNull(e3);
Map.Entry e4 = map.lowerEntry(zero);
assertNull(e4);
}
use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testContainsKey.
/**
* containsKey returns true for contained key
*/
@Test
public void testContainsKey() {
ConcurrentNavigableMap map = map5();
assertTrue(map.containsKey(one));
assertFalse(map.containsKey(zero));
}
use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testClear.
/**
* clear removes all pairs
*/
@Test
public void testClear() {
if (isReadOnly())
return;
ConcurrentNavigableMap map = map5();
map.clear();
assertEquals(0, map.size());
}
use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testRemove1_NullPointerException.
/**
* remove(null) throws NPE
*/
@Test
public void testRemove1_NullPointerException() {
try {
ConcurrentNavigableMap c = map5();
c.remove(null);
shouldThrow();
} catch (NullPointerException success) {
}
}
Aggregations