public void FindItemShouldWorkCorrectly()
        {
            var hashSet = new HashedSet<string>();
            hashSet.Add("Ivan");

            Assert.AreEqual(hashSet.Find("Ivan"), "Ivan");
        }
        public void FindItemShouldThrowWhenKeyNotExists()
        {
            var hashSet = new HashedSet <string>();

            hashSet.Add("Ivan");
            hashSet.Find("Asen");
        }
        public void FindItemShouldWorkCorrectly()
        {
            var hashSet = new HashedSet <string>();

            hashSet.Add("Ivan");

            Assert.AreEqual(hashSet.Find("Ivan"), "Ivan");
        }
        public void UnionShouldWorkCorrectly()
        {
            var hashSet1 = new HashedSet <string>();

            hashSet1.Add("Ivan");
            hashSet1.Add("Ivan1");
            hashSet1.Add("Ivan2");

            var hashSet2 = new HashedSet <string>();

            hashSet2.Add("Asen");
            hashSet2.Add("Ivan1");
            hashSet2.Add("Asen1");

            hashSet1.Union(hashSet2);

            Assert.IsTrue(hashSet1.Find("Asen1") == "Asen1");
            Assert.AreEqual(hashSet1.Count, 5);
        }
        public void IntersectShouldWorkCorrectly()
        {
            var hashSet1 = new HashedSet<string>();
            hashSet1.Add("Ivan");
            hashSet1.Add("Ivan1");
            hashSet1.Add("Ivan2");

            var hashSet2 = new HashedSet<string>();
            hashSet2.Add("Asen");
            hashSet2.Add("Ivan1");
            hashSet2.Add("Asen1");

            hashSet1.Intersect(hashSet2);

            Assert.IsTrue(hashSet1.Find("Ivan1") == "Ivan1");
            Assert.AreEqual(hashSet1.Count, 1);
        }
 public void FindItemShouldThrowWhenKeyNotExists()
 {
     var hashSet = new HashedSet<string>();
     hashSet.Add("Ivan");
     hashSet.Find("Asen");
 }