Пример #1
0
        public void Sum(int[] numbers, int expectedSum)
        {
            // Arrange
            ArraySolver arraySolver = new ArraySolver();

            // Act
            int actualSum = arraySolver.Sum(numbers);

            // Assert
            Assert.Equal(expectedSum, actualSum);
        }
Пример #2
0
        //[InlineData(new int[] { }, 0)]
        //[InlineData(null, 0)]
        public void Sum(int[] numbers, int expected)
        {
            // Arrange
            var arraySolver = new ArraySolver();

            // Act
            int actual = arraySolver.Sum(numbers);

            // Assert
            Assert.Equal(expected, actual);
        }