Пример #1
0
        public void Should_Subtract_Value()
        {
            CalculatorInvoker calculatorInvolker = new CalculatorInvoker();

            var calculator = new Calculator(3, 4);

            var command = new SubtractCommand(calculator);

            var result = calculatorInvolker.ExecuteCommand(command);

            result.Should().Be(-1);
        }
Пример #2
0
        public void Should_Add_Value()
        {
            CalculatorInvoker calculatorInvolker = new CalculatorInvoker();

            var calculator = new Calculator(3, 4);

            var command = new AddCommand(calculator);

            var result = calculatorInvolker.ExecuteCommand(command);

            result.Should().Be(7);
        }