public void DictionaryCounterDouble_Augment_2() { DictionaryCounterDouble <string> dictionary = new DictionaryCounterDouble <string>(_GetComparer()); dictionary.Augment("first", 2.0); Assert.AreEqual(2.0, dictionary.GetValue("first")); dictionary.Augment("FIRST", 2.0); Assert.AreEqual(4.0, dictionary.GetValue("first")); }
public void DictionaryCounterDouble_Clear_2() { DictionaryCounterDouble <string> dictionary = _GetDictionary2(); dictionary.Clear(); Assert.AreEqual(0.0, dictionary.GetValue("first")); Assert.AreEqual(0.0, dictionary.GetValue("second")); Assert.AreEqual(0.0, dictionary.GetValue("third")); Assert.AreEqual(0.0, dictionary.GetValue("fourth")); }
public void DictionaryCounterDouble_GetValue_2() { DictionaryCounterDouble <string> dictionary = _GetDictionary2(); Assert.AreEqual(10.0, dictionary.GetValue("first")); Assert.AreEqual(10.0, dictionary.GetValue("FIRST")); Assert.AreEqual(20.0, dictionary.GetValue("second")); Assert.AreEqual(20.0, dictionary.GetValue("SECOND")); Assert.AreEqual(30.0, dictionary.GetValue("third")); Assert.AreEqual(30.0, dictionary.GetValue("THIRD")); Assert.AreEqual(0.0, dictionary.GetValue("fourth")); Assert.AreEqual(0.0, dictionary.GetValue("FOURTH")); }
public void DictionaryCounterDouble_Increment_1() { DictionaryCounterDouble <string> dictionary = _GetDictionary1(); dictionary.Increment("second"); dictionary.Increment("third"); dictionary.Increment("first"); Assert.AreEqual(11.0, dictionary.GetValue("first")); Assert.AreEqual(0.0, dictionary.GetValue("FIRST")); Assert.AreEqual(21.0, dictionary.GetValue("second")); Assert.AreEqual(0.0, dictionary.GetValue("SECOND")); Assert.AreEqual(31.0, dictionary.GetValue("third")); Assert.AreEqual(0.0, dictionary.GetValue("THIRD")); Assert.AreEqual(0.0, dictionary.GetValue("fourth")); Assert.AreEqual(0.0, dictionary.GetValue("FOURTH")); }