public void Remove_KeyNotFound_ReturnsFalse() { // Arrange var input = GetKeyValueArray(Enumerable.Range(1, 3)); var cache = new ConcurrentLruCache <int, int>(input); // Act var result = cache.Remove(4); // Assert Assert.False(result); }
public void Remove_RemovesEntry() { // Arrange var input = GetKeyValueArray(Enumerable.Range(1, 3)); var expected = GetKeyValueArray(Enumerable.Range(1, 2)).Reverse(); var cache = new ConcurrentLruCache <int, int>(input); // Act var result = cache.Remove(3); // Assert Assert.True(result); Assert.Equal(expected, cache.TestingEnumerable); }