Exemple #1
0
        public void One_Number_Sum(string numbers)
        {
            var task = new StringCalculatorGenerator();

            char[] delimeters  = { ',' };
            var    expectedSum = 1;

            Assert.Equal(expectedSum, task.AddNumbers(numbers, delimeters));
        }
Exemple #2
0
        public void MultipleDelimeters_Numbers_Sum(string numbers)
        {
            var task = new StringCalculatorGenerator();

            char[] delimeters  = { '/', '*', '-', ',' };
            var    expectedSum = 15;

            Assert.Equal(expectedSum, task.AddNumbers(numbers, delimeters));
        }