public void Test1() { IndexedSet <int> set1 = new IndexedSet <int>(); IEnumerable <int> set2 = new List <int>(); Assert.False(set1.IsProperSubsetOf(set2)); }
public void Test11() { IndexedSet <int> set1 = new IndexedSet <int>() { 1, 2, 3, 3, 3, 3, 3, 3 }; IEnumerable <int> set2 = null; Assert.Throws <ArgumentNullException>(() => set1.IsProperSubsetOf(set2)); }
public void Test3() { IndexedSet <int> set1 = new IndexedSet <int>() { }; IEnumerable <int> set2 = new List <int>() { 0 }; Assert.True(set1.IsProperSubsetOf(set2)); }
public void IsProperSubsetOfTest() { var firstSet = new IndexedSet <string>(); var secondSet = new IndexedSet <string>(); Assert.False(firstSet.IsProperSubsetOf(secondSet)); Assert.False(secondSet.IsProperSubsetOf(firstSet)); firstSet.Add("A"); Assert.False(firstSet.IsProperSubsetOf(secondSet)); Assert.True(secondSet.IsProperSubsetOf(firstSet)); secondSet.Add("A"); Assert.False(firstSet.IsProperSubsetOf(secondSet)); Assert.False(secondSet.IsProperSubsetOf(firstSet)); firstSet.Add("B"); Assert.False(firstSet.IsProperSubsetOf(secondSet)); Assert.True(secondSet.IsProperSubsetOf(firstSet)); }