Esempio n. 1
0
        public void UnionWith_SimplifiesSet_ReturnsOtherInterval()
        {
            var set = new[]
            {
                new IntegerInterval(0, true, 1, false),
                new IntegerInterval(2, true, 3, false),
            };

            var interval = new IntegerInterval(1, true, 2, false);

            var actual = set.UnionWith(interval);

            var single = actual.Single(); // Asserts that the array contains a single entry.
            Assert.That(single.Start, Is.EqualTo(0));
            Assert.That(single.End, Is.EqualTo(3));
        }