예제 #1
0
        public void DifferenceTestTwo()
        {
            int lowerBoundary  = 5;
            int upperBoundary  = 10;
            int expectedResult = 1670;

            int calculatedResult = SumSquareDifference.CalculateSumSquareDifference(lowerBoundary, upperBoundary);

            Assert.AreEqual(expectedResult, calculatedResult);
        }
예제 #2
0
        public void CalculateSumSquareDifference_ShouldWork(int MaxNr, int expected)
        {
            int actual = SumSquareDifference.CalculateSumSquareDifference(MaxNr);

            Assert.Equal(expected, actual);
        }
예제 #3
0
        public void WhenCalculatingSumSquareDifference_ThenReturnCorrectResult()
        {
            var difference = SumSquareDifference.CalculateSumSquareDifference(1, 10);

            Assert.AreEqual(2640, difference);
        }
예제 #4
0
        public void WhenUpperAndLowerLimitAreTheSame_ThenReturnCorrectResult()
        {
            var difference = SumSquareDifference.CalculateSumSquareDifference(5, 5);

            Assert.AreEqual(0, difference);
        }
예제 #5
0
 public void WhenUpperLimitIsBiggerThanLowerLimit_ThenCalculateSumSquareDifferenceThrowsException()
 {
     SumSquareDifference.CalculateSumSquareDifference(5, -2);
 }