Ejemplo n.º 1
0
        public void BinProvider_CreateBins_ReturnIReadOnlyCollection_ThrowsArgumentException(int rangeStart, int rangeEnd, int countOfBins)
        {
            // Arrange
            var sut = new BinProvider();

            // Act

            // Assert
            Assert.Throws <ArgumentException>(() =>
            {
                sut.CreateBins(rangeStart, rangeEnd, countOfBins);
            });
        }
Ejemplo n.º 2
0
        public void BinProvider_CreateBins_ReturnIReadOnlyCollection_IsTrue(Interval testRange, int countOfBins, Interval[] expectedResults)
        {
            // Arrange
            var sut = new BinProvider();

            // Act
            var results = sut.CreateBins(testRange.Start, testRange.End, countOfBins);

            // Assert
            for (int index = 0; index < results.Count; index++)
            {
                var result         = results[index];
                var expectedResult = expectedResults[index];

                Assert.IsTrue(result.Range.Start == expectedResult.Start && result.Range.End == expectedResult.End);
            }
        }