示例#1
0
        public void OrderNumsNotInRangeGenerateMissingIntervalObject()
        {
            //Arrange
            var orderNums = new[] { 1, 2, 3, 4, 5 };

            var sut = new OrderDiffGenerator();

            //Act
            var orderReport = sut.InclusionReport(orderNums, 6, 10);

            //Assert
            Assert.AreEqual(5, orderReport.MissingInInterval.Count());
        }
示例#2
0
        public void OrderNumsAboveRangeGenerateAboveIntervalObject()
        {
            //Arrange
            var orderNums = new[] { 11, 12, 13, 14, 15 };

            var sut = new OrderDiffGenerator();

            //Act
            var orderReport = sut.InclusionReport(orderNums, 6, 10);

            //Assert
            Assert.AreEqual(5, orderReport.AboveUpperBound.Count());
        }
示例#3
0
        public void OrderNumsBelowRangeGenerareBelowRangeObject()
        {
            //Arrange
            var orderNums = new[] { 1, 2, 3, 4, 5 };

            var sut = new OrderDiffGenerator();

            //Act
            var orderReport = sut.InclusionReport(orderNums, 6, 10);

            //Assert
            Assert.AreEqual(5, orderReport.BelowLowerBound.Count());
        }
示例#4
0
        public void WhenAllOrderNumbersAreBelowAndAboveIntervalTwoObjectsAreGenerated()
        {
            //Arrange
            var orderNums = new[] { 1, 2, 3, 11, 12, 13 };

            var sut = new OrderDiffGenerator();

            //Act
            var orderReport = sut.InclusionReport(orderNums, 6, 10);

            //Assert
            Assert.AreEqual(3, orderReport.BelowLowerBound.Count());
            Assert.AreEqual(3, orderReport.AboveUpperBound.Count());
        }
示例#5
0
        public void WhenAllOrderNumbersAreInIntervalNoObjectIsGenerated()
        {
            //Arrange
            var orderNums = new[] { 6, 7, 8, 9, 10 };

            var sut = new OrderDiffGenerator();

            //Act
            var orderReport = sut.InclusionReport(orderNums, 6, 10);

            //Assert
            Assert.IsFalse(orderReport.BelowLowerBound.Any());
            Assert.IsFalse(orderReport.MissingInInterval.Any());
            Assert.IsFalse(orderReport.AboveUpperBound.Any());
        }