예제 #1
0
        public void SumsAllTheElementsOfTheArray_ArraySum_ReturnsTheTotalOfTheElements()
        {
            int result = _algorithm.Sum(new[] { 1, 2, 4, 5 });

            Assert.IsTrue(result == 12);
        }
예제 #2
0
        public void TestArraySumAccuracy()
        {
            int[] inputArray = { 1, 2, 3, 4, 5 };

            Assert.AreEqual(15, ArraySum.Sum(inputArray));
        }