public void ArraySum_ReturnsSumOfArray_IfArrayValid(long[] inputArray, long sumValue) { var result = ArraySumFunctions.ArraySum(inputArray); Assert.AreEqual(sumValue, result); }
public void ArraySum_ThrowsNullException_IfArrayIsNull() { long[] testArray = null; Assert.That(() => ArraySumFunctions.ArraySum(testArray), Throws.ArgumentNullException); }
public void ArraySum_ThrowsArgumentException_IfArrayIsEmpty() { long[] testArray = { }; Assert.That(() => ArraySumFunctions.ArraySum(testArray), Throws.ArgumentException); }