public void testValues_empty_remove() { for (LoadingCache<Object, Object> cache : caches()) { Collection<Object> values = cache.asMap().values(); assertFalse(values.remove(null)); assertFalse(values.remove(6)); assertFalse(values.remove(-6)); assertFalse(values.removeAll(asList(null, 0, 15, 1500))); assertFalse(values.retainAll(asList(null, 0, 15, 1500))); checkEmpty(values); checkEmpty(cache); } }
public void testKeySet_empty_remove() { for (LoadingCache<Object, Object> cache : caches()) { Set<Object> keys = cache.asMap().keySet(); assertFalse(keys.remove(null)); assertFalse(keys.remove(6)); assertFalse(keys.remove(-6)); assertFalse(keys.removeAll(asList(null, 0, 15, 1500))); assertFalse(keys.retainAll(asList(null, 0, 15, 1500))); checkEmpty(keys); checkEmpty(cache); } }
public void testEquals_null() { for (LoadingCache<Object, Object> cache : caches()) { assertFalse(cache.equals(null)); } }
public void testKeySet_remove() { for (LoadingCache<Object, Object> cache : caches()) { cache.getUnchecked(1); cache.getUnchecked(2); Set<Object> keys = cache.asMap().keySet(); // We don't know whether these are still in the cache, so we can't assert on the return // values of these removes, but the cache should be empty after the removes, regardless. keys.remove(1); keys.remove(2); assertFalse(keys.remove(null)); assertFalse(keys.remove(6)); assertFalse(keys.remove(-6)); assertFalse(keys.removeAll(asList(null, 0, 15, 1500))); assertFalse(keys.retainAll(asList(null, 0, 15, 1500))); checkEmpty(keys); checkEmpty(cache); } }
public void testValues_remove() { for (LoadingCache<Object, Object> cache : caches()) { cache.getUnchecked(1); cache.getUnchecked(2); Collection<Object> values = cache.asMap().keySet(); // We don't know whether these are still in the cache, so we can't assert on the return // values of these removes, but the cache should be empty after the removes, regardless. values.remove(1); values.remove(2); assertFalse(values.remove(null)); assertFalse(values.remove(6)); assertFalse(values.remove(-6)); assertFalse(values.removeAll(asList(null, 0, 15, 1500))); assertFalse(values.retainAll(asList(null, 0, 15, 1500))); checkEmpty(values); checkEmpty(cache); } }
public void testEntrySet_empty_remove() { for (LoadingCache<Object, Object> cache : caches()) { Set<Entry<Object, Object>> entrySet = cache.asMap().entrySet(); assertFalse(entrySet.remove(null)); assertFalse(entrySet.remove(entryOf(6, 6))); assertFalse(entrySet.remove(entryOf(-6, -6))); assertFalse(entrySet.removeAll(asList(null, entryOf(0, 0), entryOf(15, 15)))); assertFalse(entrySet.retainAll(asList(null, entryOf(0, 0), entryOf(15, 15)))); checkEmpty(entrySet); checkEmpty(cache); } }
public void testKeySet_empty_remove() { for (LoadingCache<Object, Object> cache : caches()) { Set<Object> keys = cache.asMap().keySet(); assertFalse(keys.remove(null)); assertFalse(keys.remove(6)); assertFalse(keys.remove(-6)); assertFalse(keys.removeAll(asList(null, 0, 15, 1500))); assertFalse(keys.retainAll(asList(null, 0, 15, 1500))); checkEmpty(keys); checkEmpty(cache); } }
public void testValues_empty_remove() { for (LoadingCache<Object, Object> cache : caches()) { Collection<Object> values = cache.asMap().values(); assertFalse(values.remove(null)); assertFalse(values.remove(6)); assertFalse(values.remove(-6)); assertFalse(values.removeAll(asList(null, 0, 15, 1500))); assertFalse(values.retainAll(asList(null, 0, 15, 1500))); checkEmpty(values); checkEmpty(cache); } }
public void testEquals_null() { for (LoadingCache<Object, Object> cache : caches()) { assertFalse(cache.equals(null)); } }
public void testEntrySet_remove() { for (LoadingCache<Object, Object> cache : caches()) { cache.getUnchecked(1); cache.getUnchecked(2); Set<Entry<Object, Object>> entrySet = cache.asMap().entrySet(); // We don't know whether these are still in the cache, so we can't assert on the return // values of these removes, but the cache should be empty after the removes, regardless. entrySet.remove(entryOf(1, 1)); entrySet.remove(entryOf(2, 2)); assertFalse(entrySet.remove(null)); assertFalse(entrySet.remove(entryOf(1, 1))); assertFalse(entrySet.remove(entryOf(6, 6))); assertFalse(entrySet.removeAll(asList(null, entryOf(1, 1), entryOf(15, 15)))); assertFalse(entrySet.retainAll(asList(null, entryOf(1, 1), entryOf(15, 15)))); checkEmpty(entrySet); checkEmpty(cache); } }
public void testValues_remove() { for (LoadingCache<Object, Object> cache : caches()) { cache.getUnchecked(1); cache.getUnchecked(2); Collection<Object> values = cache.asMap().keySet(); // We don't know whether these are still in the cache, so we can't assert on the return // values of these removes, but the cache should be empty after the removes, regardless. values.remove(1); values.remove(2); assertFalse(values.remove(null)); assertFalse(values.remove(6)); assertFalse(values.remove(-6)); assertFalse(values.removeAll(asList(null, 0, 15, 1500))); assertFalse(values.retainAll(asList(null, 0, 15, 1500))); checkEmpty(values); checkEmpty(cache); } }
public void testKeySet_remove() { for (LoadingCache<Object, Object> cache : caches()) { cache.getUnchecked(1); cache.getUnchecked(2); Set<Object> keys = cache.asMap().keySet(); // We don't know whether these are still in the cache, so we can't assert on the return // values of these removes, but the cache should be empty after the removes, regardless. keys.remove(1); keys.remove(2); assertFalse(keys.remove(null)); assertFalse(keys.remove(6)); assertFalse(keys.remove(-6)); assertFalse(keys.removeAll(asList(null, 0, 15, 1500))); assertFalse(keys.retainAll(asList(null, 0, 15, 1500))); checkEmpty(keys); checkEmpty(cache); } }
public void testEntrySet_empty_remove() { for (LoadingCache<Object, Object> cache : caches()) { Set<Entry<Object, Object>> entrySet = cache.asMap().entrySet(); assertFalse(entrySet.remove(null)); assertFalse(entrySet.remove(entryOf(6, 6))); assertFalse(entrySet.remove(entryOf(-6, -6))); assertFalse(entrySet.removeAll(asList(null, entryOf(0, 0), entryOf(15, 15)))); assertFalse(entrySet.retainAll(asList(null, entryOf(0, 0), entryOf(15, 15)))); checkEmpty(entrySet); checkEmpty(cache); } }
public void testEntrySet_remove() { for (LoadingCache<Object, Object> cache : caches()) { cache.getUnchecked(1); cache.getUnchecked(2); Set<Entry<Object, Object>> entrySet = cache.asMap().entrySet(); // We don't know whether these are still in the cache, so we can't assert on the return // values of these removes, but the cache should be empty after the removes, regardless. entrySet.remove(entryOf(1, 1)); entrySet.remove(entryOf(2, 2)); assertFalse(entrySet.remove(null)); assertFalse(entrySet.remove(entryOf(1, 1))); assertFalse(entrySet.remove(entryOf(6, 6))); assertFalse(entrySet.removeAll(asList(null, entryOf(1, 1), entryOf(15, 15)))); assertFalse(entrySet.retainAll(asList(null, entryOf(1, 1), entryOf(15, 15)))); checkEmpty(entrySet); checkEmpty(cache); } }
public void testKeySet_empty_remove() { for (LoadingCache<Object, Object> cache : caches()) { Set<Object> keys = cache.asMap().keySet(); assertFalse(keys.remove(null)); assertFalse(keys.remove(6)); assertFalse(keys.remove(-6)); assertFalse(keys.removeAll(asList(null, 0, 15, 1500))); assertFalse(keys.retainAll(asList(null, 0, 15, 1500))); checkEmpty(keys); checkEmpty(cache); } }
public void testValues_empty_remove() { for (LoadingCache<Object, Object> cache : caches()) { Collection<Object> values = cache.asMap().values(); assertFalse(values.remove(null)); assertFalse(values.remove(6)); assertFalse(values.remove(-6)); assertFalse(values.removeAll(asList(null, 0, 15, 1500))); assertFalse(values.retainAll(asList(null, 0, 15, 1500))); checkEmpty(values); checkEmpty(cache); } }
public void testEquals_null() { for (LoadingCache<Object, Object> cache : caches()) { assertFalse(cache.equals(null)); } }
public void testValues_remove() { for (LoadingCache<Object, Object> cache : caches()) { cache.getUnchecked(1); cache.getUnchecked(2); Collection<Object> values = cache.asMap().keySet(); // We don't know whether these are still in the cache, so we can't assert on the return // values of these removes, but the cache should be empty after the removes, regardless. values.remove(1); values.remove(2); assertFalse(values.remove(null)); assertFalse(values.remove(6)); assertFalse(values.remove(-6)); assertFalse(values.removeAll(asList(null, 0, 15, 1500))); assertFalse(values.retainAll(asList(null, 0, 15, 1500))); checkEmpty(values); checkEmpty(cache); } }
public void testKeySet_remove() { for (LoadingCache<Object, Object> cache : caches()) { cache.getUnchecked(1); cache.getUnchecked(2); Set<Object> keys = cache.asMap().keySet(); // We don't know whether these are still in the cache, so we can't assert on the return // values of these removes, but the cache should be empty after the removes, regardless. keys.remove(1); keys.remove(2); assertFalse(keys.remove(null)); assertFalse(keys.remove(6)); assertFalse(keys.remove(-6)); assertFalse(keys.removeAll(asList(null, 0, 15, 1500))); assertFalse(keys.retainAll(asList(null, 0, 15, 1500))); checkEmpty(keys); checkEmpty(cache); } }
public void testEntrySet_empty_remove() { for (LoadingCache<Object, Object> cache : caches()) { Set<Entry<Object, Object>> entrySet = cache.asMap().entrySet(); assertFalse(entrySet.remove(null)); assertFalse(entrySet.remove(entryOf(6, 6))); assertFalse(entrySet.remove(entryOf(-6, -6))); assertFalse(entrySet.removeAll(asList(null, entryOf(0, 0), entryOf(15, 15)))); assertFalse(entrySet.retainAll(asList(null, entryOf(0, 0), entryOf(15, 15)))); checkEmpty(entrySet); checkEmpty(cache); } }