예제 #1
0
        public int[] IntersectWith_IntValues_ElementsThatNotInSecondSetWasRemoved(int[] set, int[] other)
        {
            AddValues(set);

            _intSet.IntersectWith(other);

            return(_intSet.ToArray());
        }
예제 #2
0
        public void TestIntersects()
        {
            var set = new BinaryTreeSet <int>();

            set.Add(1);
            set.Add(2);
            set.Add(3);

            set.IntersectWith(new[] { 2, 3, 4, 5 });

            CollectionAssert.AreEqual(new[] { 2, 3 }, set.ToList());
        }
예제 #3
0
 public void IntersectWith_NullOther_ArgumentNullException()
 => Assert.Catch <ArgumentNullException>(() => _filledIntSet.IntersectWith(null));