Exemple #1
0
        public void Returns_sum_from_string_with_new_separator()
        {
            var calculator = new KataCalculator();
            var result     = calculator.Add("//,\n1,2");

            Assert.AreEqual(3, result);
        }
Exemple #2
0
        public void Returns_zero_from_new_separator()
        {
            var calculator = new KataCalculator();
            var result     = calculator.Add("//,\n");

            Assert.AreEqual(0, result);
        }
Exemple #3
0
        public void Returns_sum_from_two_input()
        {
            var calculator = new KataCalculator();
            var result     = calculator.Add("1,2");

            Assert.AreEqual(3, result);
        }
Exemple #4
0
        public void Returns_sum_from_multiple_input()
        {
            var calculator = new KataCalculator();
            var result     = calculator.Add("1,2,3,4,5");

            Assert.AreEqual(15, result);
        }
Exemple #5
0
        public void Returns_Zero_from_empty_string()
        {
            var calculator = new KataCalculator();
            var result     = calculator.Add("");

            Assert.AreEqual(0, result);
        }