コード例 #1
0
        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);
        }
コード例 #2
0
 public void ThenTheSumShouldBe(int expected)
 {
     Assert.AreEqual(expected, _maxSum.FindSum(_values));
 }