public void Remove_01() { for (int i = 0; i < capacity; i++) { cache.Insert(i, i); } for (int i = 0; i < capacity; i++) { cache.Remove(i); Assert.AreEqual(capacity - i - 1, cache.Count()); } }
public void When_Value_Removed_Then_Value_No_Longer_In_Cache(dynamic objectToAdd) { // When a value is added to the lruCache _lruCache.Add(objectToAdd, objectToAdd); // Then it exists in the lruCache Assert.That(_lruCache.ContainsKey(objectToAdd), Is.True); // When a value is removed from the lruCache _lruCache.Remove(objectToAdd); // Then the value should not exist in the lruCache Assert.That(_lruCache.ContainsKey(objectToAdd), Is.False); }