Exemple #1
0
        public void AddEntryShouldReturnEntryUsingGetEntry(int key, string actual, LeastRecentlyUsedCache <int, string> sut)
        {
            // Arrange

            // Act
            sut.AddEntry(key, actual);
            var expected = sut.GetEntry(key);

            // Assert
            actual.ShouldBe(expected);
        }
Exemple #2
0
        public void RemoveEntryShouldRemove(int key, string entry, LeastRecentlyUsedCache <int, string> sut)
        {
            // Arrange
            sut.AddEntry(key, entry);

            // Act
            sut.RemoveEntry(key);
            var actual = sut.GetEntry(key);

            // Assert
            actual.ShouldBeNull();
        }