Example #1
0
        public void InsertAndRetreiveNodeWithoutExceptionWithCacherNoParams()
        {
            // Arrange
            var cache = new Cacher();

            // Act
            cache.Insert("key", "valueA");

            // Assert
            Assert.IsTrue(cache.Fetch("key").ToString() == "valueA");
        }
Example #2
0
        public void InsertAndRetreiveNodeWithoutExceptionWithCacher()
        {
            // Arrange
            var cache = new Cacher("getStartedCache", "handleName");

            // Act
            cache.Insert("keyA", "valueA");

            // Assert
            Assert.IsTrue(cache.Fetch("keyA").ToString() == "valueA");
        }
Example #3
0
        public void DoesCacherStringProperlyHandleSubsequentInsertCallsOnTheSameKey()
        {
            // Arrange
            var cache = new Cacher <string>("getStartedCache", "handleName");

            // Act
            cache.Insert("keyA", "valueA");
            cache.Insert("keyA", "valueB");

            // Assert
            Assert.IsTrue(cache.Fetch("keyA") == "valueB");
        }