public int[] IntersectWith_IntValues_ElementsThatNotInSecondSetWasRemoved(int[] set, int[] other) { AddValues(set); _intSet.IntersectWith(other); return(_intSet.ToArray()); }
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()); }
public void IntersectWith_NullOther_ArgumentNullException() => Assert.Catch <ArgumentNullException>(() => _filledIntSet.IntersectWith(null));