public void DifferenceTestTwo() { int lowerBoundary = 5; int upperBoundary = 10; int expectedResult = 1670; int calculatedResult = SumSquareDifference.CalculateSumSquareDifference(lowerBoundary, upperBoundary); Assert.AreEqual(expectedResult, calculatedResult); }
public void CalculateSumSquareDifference_ShouldWork(int MaxNr, int expected) { int actual = SumSquareDifference.CalculateSumSquareDifference(MaxNr); Assert.Equal(expected, actual); }
public void WhenCalculatingSumSquareDifference_ThenReturnCorrectResult() { var difference = SumSquareDifference.CalculateSumSquareDifference(1, 10); Assert.AreEqual(2640, difference); }
public void WhenUpperAndLowerLimitAreTheSame_ThenReturnCorrectResult() { var difference = SumSquareDifference.CalculateSumSquareDifference(5, 5); Assert.AreEqual(0, difference); }
public void WhenUpperLimitIsBiggerThanLowerLimit_ThenCalculateSumSquareDifferenceThrowsException() { SumSquareDifference.CalculateSumSquareDifference(5, -2); }