public void FindSum_PassArray_SumIsCorrect(string array, int actualMaxvalue) { var testArr = array .Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries) .Select(num => int.Parse(num.Trim())).ToArray(); MaxSum maxSum = new MaxSum(); var maxSumValue = maxSum.FindSum(testArr); Assert.AreEqual(actualMaxvalue, maxSumValue); }
public void ThenTheSumShouldBe(int expected) { Assert.AreEqual(expected, _maxSum.FindSum(_values)); }