use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testDescendingContainsValue.
/**
* containsValue returns true for held values
*/
@Test
public void testDescendingContainsValue() {
ConcurrentNavigableMap map = dmap5();
assertTrue(map.containsValue("A"));
assertFalse(map.containsValue("Z"));
}
use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testReplace_NullPointerException.
/**
* replace(null, x) throws NPE
*/
@Test
public void testReplace_NullPointerException() {
try {
ConcurrentNavigableMap c = map5();
c.replace(null, "whatever");
shouldThrow();
} catch (NullPointerException success) {
}
}
use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testContainsValue.
/**
* containsValue returns true for held values
*/
@Test
public void testContainsValue() {
ConcurrentNavigableMap map = map5();
assertTrue(map.containsValue("A"));
assertFalse(map.containsValue("Z"));
}
use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testDescendingFirstKey.
/**
* firstKey returns first key
*/
@Test
public void testDescendingFirstKey() {
ConcurrentNavigableMap map = dmap5();
assertEquals(m1, map.firstKey());
}
use of java.util.concurrent.ConcurrentNavigableMap in project mapdb by jankotek.
the class ConcurrentSkipListSubMapTest method testDescendingHigherEntry.
/**
* higherEntry returns next entry.
*/
@Test
public void testDescendingHigherEntry() {
ConcurrentNavigableMap map = dmap5();
Map.Entry e1 = map.higherEntry(m3);
assertEquals(m4, e1.getKey());
Map.Entry e2 = map.higherEntry(zero);
assertEquals(m1, e2.getKey());
Map.Entry e3 = map.higherEntry(m5);
assertNull(e3);
Map.Entry e4 = map.higherEntry(m6);
assertNull(e4);
}
Aggregations