protected static void CalculateSumOfNumbersExample() { int numA = 67; int numB = 90; int numC = 99; long[] numbersToSumArray = { numA, numB, numC }; List <long> numbersToSumList = new List <long> { numA, numB, numC }; CalculateSumOfNumbers calculateSumOfNumbers = new CalculateSumOfNumbers(); long sumToUse = calculateSumOfNumbers.Calculate(numbersToSumArray); Console.WriteLine("The array sum of numA, numB, and numC is " + sumToUse); sumToUse = calculateSumOfNumbers.Calculate(numbersToSumList); Console.WriteLine("The list sum of numA, numB, and numC is " + sumToUse); }
protected void CalculateComparisonTest(List <long> numbersToSumList, CalculateSumOfNumbers calculateSumOfNumbers, long answerOfSum) { long sumResult = calculateSumOfNumbers.Calculate(numbersToSumList); Assert.Equal(sumResult, answerOfSum); }