public void DetermineProperSubsetOfEnumerable() { var seta = new int[] { 1, 2, 4, 8, 16, 32 }; IImmutableSet <int> setb = new ImmutableSet8().Add(1, 2, 3, 4, 5); IImmutableSet <int> setc = new ImmutableSet8().Add(1, 2, 4); // proper subset should not include items not in super set setb.IsProperSubsetOf(seta).Should().BeFalse(); // proper subset should not contain all items in super set setc.IsProperSubsetOf(new int[] { 1, 2, 4 }).Should().BeFalse(); // proper subset should only contain values in super set setc.IsProperSubsetOf(seta).Should().BeTrue(); }
public void DetermineProperSubsetOfSet() { var seta = new ImmutableSet8().Add(0, 1, 3, 7); var setb = new ImmutableSet8().Add(0, 1, 2, 3, 4); var setc = new ImmutableSet8().Add(0, 1, 3); // proper subset should not include items not in super set setb.IsProperSubsetOf(seta).Should().BeFalse(); // proper subset should not contain all items in super set seta.IsProperSubsetOf(seta).Should().BeFalse(); // proper subset should only contain values in super set setc.IsProperSubsetOf(seta).Should().BeTrue(); }