Esempio n. 1
0
        public void Add_shoudul_add_two_integers()
        {
            // Arrange
            Chain calc = new AddNumber(new SubstractNumber(new MultiplyNumbers(null)));

            // Act
            int result = calc.CalculateNumbers(new Numbers(1, 2, "add"));

            // Assert
            Assert.AreEqual(3, result);
        }
Esempio n. 2
0
        public void Substract_should_substract_integer()
        {
            // Arrange
            Chain calc = new AddNumber(new SubstractNumber(null));

            // Act
            int result = calc.CalculateNumbers(new Numbers(1, 2, "substract"));

            // Assert
            Assert.AreEqual(-1, result);
        }