示例#1
0
        public void Entering_multiple_numbers_and_have_them_all_add()
        {
            //Arrange -
            var number      = "2,3,4";
            var numberAdder = new NumberAdder();
            //Act-
            var result = numberAdder.AddNumbers(number);

            //Assert-
            Assert.AreEqual(9, result);
        }
示例#2
0
        Entering_one_number_returnss_the_same_numer()
        {
            //Arrange -
            var number      = "1";
            var numberAdder = new NumberAdder();
            //Act-
            var result = numberAdder.AddNumbers(number);

            //Assert-
            Assert.AreEqual(1, result);
        }
示例#3
0
            public void Entering_an_empty_string_results_in_the_sum_of_zero()
            {
                //Arrange -
                var number      = "";
                var numberAdder = new NumberAdder();
                //Act-
                var result = numberAdder.AddNumbers(number);

                //Assert-
                Assert.AreEqual(0, result);
            }
示例#4
0
        public void Entering_an_empty_string_results_in_the_sum_of_0()
        {
            //Arrange
            var number      = "";
            var numberAdder = new NumberAdder();

            //Act
            var sum = numberAdder.AddNumbers(number);

            //Assert
            Assert.AreEqual(0, sum);
        }
示例#5
0
        public void Entering_two_numbers_results_in_returning_the_sum_of_both_numbers()
        {
            //Arrange
            var number      = "4, 7";
            var numberAdder = new NumberAdder();

            //Act
            var sum = numberAdder.AddNumbers(number);

            //Assert
            Assert.AreEqual(11, sum);
        }
示例#6
0
        public void Entering_one_number_results_in_returning_the_same_number()
        {
            //Arrange
            var number      = "3";
            var numberAdder = new NumberAdder();

            //Act
            var sum = numberAdder.AddNumbers(number);

            //Assert
            Assert.AreEqual(3, sum);
        }