public void InsertAndRetreiveNodeWithoutExceptionWithCacherNoParams() { // Arrange var cache = new Cacher(); // Act cache.Insert("key", "valueA"); // Assert Assert.IsTrue(cache.Fetch("key").ToString() == "valueA"); }
public void InsertAndRetreiveNodeWithoutExceptionWithCacher() { // Arrange var cache = new Cacher("getStartedCache", "handleName"); // Act cache.Insert("keyA", "valueA"); // Assert Assert.IsTrue(cache.Fetch("keyA").ToString() == "valueA"); }
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"); }