public void ModifyDictionary_Get() { IDictionary dictionary = new ModifyDictionary(); dictionary ["a"] = "b"; // first time we return "b" - because the value was cached Assert.AreEqual("b", dictionary ["a"], "#1"); // second time we return "a" - because it's the value in the dictionary Assert.AreEqual("a", dictionary ["a"], "#2"); }
public void ModifyDictionary_Get () { IDictionary dictionary = new ModifyDictionary (); dictionary ["a"] = "b"; // first time we return "b" - because the value was cached Assert.AreEqual ("b", dictionary ["a"], "#1"); // second time we return "a" - because it's the value in the dictionary Assert.AreEqual ("a", dictionary ["a"], "#2"); }