public void ContainsKey2()
        {
            DoubleKeyMultiDictionary <string, string, int> dictionary = new DoubleKeyMultiDictionary <string, string, int>();

            dictionary.Add("k1", "k2", 10);
            dictionary.Add("k3", "k4", 20);

            Assert.IsTrue(dictionary.ContainsKey2("k2"));
            Assert.IsTrue(dictionary.ContainsKey2("k2"));

            Assert.IsFalse(dictionary.ContainsKey1("bla"));
        }
        public void RemoveForKey2()
        {
            DoubleKeyMultiDictionary <string, string, int> dictionary = new DoubleKeyMultiDictionary <string, string, int>();

            dictionary.Add("k1", "k2", 10);
            dictionary.Add("k1", "k2", 10); // the same keys and the value

            dictionary.Add("k3", "k4", 20);

            Assert.IsTrue(dictionary.RemoveForKey2("k2"));
            Assert.AreEqual(1, dictionary.Count);
            Assert.AreEqual(20, dictionary.GetValues("k3", "k4").First());
            Assert.IsFalse(dictionary.ContainsKey2("k2"));


            dictionary = new DoubleKeyMultiDictionary <string, string, int>();

            dictionary.Add("k1", "k2", 10);
            dictionary.Add("k1", "k2", 10); // the same keys and the value

            dictionary.Add("k3", "k4", 20);

            int  counter = 0;
            bool result  = dictionary.RemoveForKey2("k2", (k1, k2, v) =>
            {
                ++counter;
                return(counter < 2);
            }
                                                    );

            Assert.IsTrue(result);
            Assert.AreEqual(2, dictionary.Count);
            Assert.AreEqual(10, dictionary.GetValues("k1", "k2").First());
            Assert.AreEqual(20, dictionary.GetValues("k3", "k4").First());
            Assert.IsTrue(dictionary.ContainsKey2("k2"));


            Assert.IsFalse(dictionary.RemoveForKey2("bla1"));
        }