Ejemplo n.º 1
0
 public void IntersectWithRemoveElementTest()
 {
     set.Add(1);
     set.Add(2);
     set.Add(3);
     set.IntersectWith(list);
     Assert.IsFalse(set.Contains(2));
 }
        public void IntersectWithIsCorrect()
        {
            var set = new MySet <int> {
                1, 3, 0, 2, 4
            };
            var list = new List <int>()
            {
                0, 1, 5
            };

            set.IntersectWith(list);
            Assert.IsTrue(set.Contains(0));
            Assert.IsTrue(set.Contains(1));
            Assert.IsFalse(set.Contains(5));
            Assert.IsFalse(set.Contains(3));
        }