예제 #1
0
        public void DetermineOverlapWithEnumerable()
        {
            IImmutableSet <int> seta = new ImmutableSet8().Add(1, 2, 3);
            var setb = Enumerable.Range(3, 3);
            var setc = Enumerable.Range(5, 3);

            seta.Overlaps(setb).Should().BeTrue();
            seta.Overlaps(setc).Should().BeFalse();
        }
예제 #2
0
        public void DetermineOverlapWithSet()
        {
            var seta = new ImmutableSet8().Add(1, 2, 3);
            var setb = new ImmutableSet8().Add(3, 4, 5);
            var setc = new ImmutableSet8().Add(5, 6, 7);

            seta.Overlaps(setb).Should().BeTrue();
            seta.Overlaps(setc).Should().BeFalse();
            setb.Overlaps(setc).Should().BeTrue();
        }