Ejemplo n.º 1
0
        public void Test_For_1_Number_Returns_That_Number_Plus_Zero()
        {
            //Arrange
            var additionCalculator = new AdditionCalculator();

            //Act
            int result = additionCalculator.AddNumbers("1");

            //Assert
            Assert.AreEqual(1, result);
        }
Ejemplo n.º 2
0
        public void Test_For_2_Numbers_Returns_The_Sum_Of_Those_Numbers()
        {
            //Arrange
            var additionCalculator = new AdditionCalculator();

            //Act
            int result = additionCalculator.AddNumbers("1", "2");

            //Assert
            Assert.AreEqual(3, result);
        }
Ejemplo n.º 3
0
        public void Test_Empty_String()
        {
            //Arrange
            string numbers            = string.Empty;
            var    additionCalculator = new AdditionCalculator();

            //Act
            int result = additionCalculator.AddNumbers("");

            //Assert
            Assert.AreEqual(0, result);
        }