Esempio n. 1
0
        public void CreateHighPriorityOperation_DivideSymbol_ReturnsDivideOperation()
        {
            // Arrange
            const char divideSymbol = '/';

            var operationFactory = new OperationFactory();

            // Act
            var operation = operationFactory.CreateHighPriorityOperation(divideSymbol);

            // Assert
            operation.Should().NotBeNull();
            operation.Invoke(10, 2).Should().Be(5);
        }
Esempio n. 2
0
        public void CreateHighPriorityOperation_MultiplySymbol_ReturnsMultiplyOperation()
        {
            // Arrange
            const char multiplySymbol = '*';

            var operationFactory = new OperationFactory();

            // Act
            var operation = operationFactory.CreateHighPriorityOperation(multiplySymbol);

            // Assert
            operation.Should().NotBeNull();
            operation.Invoke(10, 2).Should().Be(20);
        }