public void SHOULD_INDICATE_ABSENCE_WHEN_VALUE_IS_NOT_CACHED() { //Arrange var cache = new DictionaryKeyValueCache <Type, string>(); var type = typeof(InjectableClass); //Act var exists = cache.ContainsKey(type); //Assert exists.Should().BeFalse(); }
public void SHOULD_RETURN_CACHED_VALUE_FOR_CACHED_ENTRY() { //Arrange var cache = new DictionaryKeyValueCache <Type, string>(); var type = typeof(InjectableClass); cache.AddEntry(type, "CachedValue"); //Act var value = cache.GetEntryValue(type); //Assert value.Should().Be("CachedValue"); }
public void SHOULD_INDICATE_EXISTENCE_WHEN_VALUE_IS_CACHED() { //Arrange var cache = new DictionaryKeyValueCache <Type, string>(); var type = typeof(InjectableClass); cache.AddEntry(type, "string1"); //Act var exists = cache.ContainsKey(type); //Assert exists.Should().BeTrue(); }