public void when_add_pair_then_can_look_it_up() { var dictionary = new NotNullDictionary<String, String>(); dictionary.Add("foo", "bar"); Assert.AreEqual("bar", dictionary["foo"]); }
public void when_ContainsKey_that_exists_then_returns_true() { var dictionary = new NotNullDictionary<String, String>(); dictionary.Add("foo", "bar"); var result = dictionary.ContainsKey("foo"); Assert.IsTrue(result); }
public void when_TryGet_value_that_exists_then_returns_true() { var dictionary = new NotNullDictionary<String, String>(); dictionary.Add("foo", "bar"); String value; var result = dictionary.TryGetValue("foo", out value); Assert.IsTrue(result); }