Ejemplo n.º 1
0
        public void ClearDict()
        {
            var BTD = new BinaryTreeDictionary <int, int>();

            BTD[0] = 1;
            BTD.Add(3, 2);
            BTD.Add(new KeyValuePair <int, int>(5, 11));
            BTD.Clear();
            Assert.AreEqual(default, BTD[default]);
Ejemplo n.º 2
0
        public void TestClear()
        {
            var dict = new BinaryTreeDictionary <int, string>();

            dict.Add(1, "first value");
            dict.Add(3, "third value");
            dict.Clear();

            Assert.AreEqual(0, dict.Count);
        }
        public void TestClear()
        {
            var dictionary = new BinaryTreeDictionary <int, string>();

            dictionary.Add(8, "eight");
            dictionary.Add(3, "three");
            dictionary.Add(6, "six");
            dictionary.Add(4, "four");

            dictionary.Clear();

            Assert.AreEqual(0, dictionary.Count);
        }