public void Test9() { IndexedSet <int> set1 = new IndexedSet <int>() { 1, 2, 3 }; IEnumerable <int> set2 = null; Assert.Throws <ArgumentNullException>(() => set1.Overlaps(set2)); }
public void Test8() { IndexedSet <int> set1 = new IndexedSet <int>() { 1, 2, 3 }; IEnumerable <int> set2 = set1; Assert.True(set1.Overlaps(set2)); }
public void Test1() { IndexedSet <int> set1 = new IndexedSet <int>() { }; IEnumerable <int> set2 = new List <int>() { }; Assert.False(set1.Overlaps(set2)); }
public void Test6() { IndexedSet <int> set1 = new IndexedSet <int>() { 1, 2, 3 }; IEnumerable <int> set2 = new List <int>() { 0, 4, 5, 6, 7, 8, 9, 1 }; Assert.True(set1.Overlaps(set2)); }
public void Test4() { IndexedSet <int> set1 = new IndexedSet <int>() { 0 }; IEnumerable <int> set2 = new List <int>() { 0 }; Assert.True(set1.Overlaps(set2)); }
public void OverlapsTest() { var firstSet = new IndexedSet <string>(); var secondSet = new IndexedSet <string>(); Assert.False(firstSet.Overlaps(secondSet)); Assert.False(secondSet.Overlaps(firstSet)); firstSet.Add("A"); Assert.False(firstSet.Overlaps(secondSet)); Assert.False(secondSet.Overlaps(firstSet)); secondSet.Add("A"); Assert.True(firstSet.Overlaps(secondSet)); Assert.True(secondSet.Overlaps(firstSet)); firstSet.Add("B"); Assert.True(firstSet.Overlaps(secondSet)); Assert.True(secondSet.Overlaps(firstSet)); }