Ejemplo n.º 1
0
        public void AddingNumber3()
        {
            //Arrange
            string            number2      = "123";
            string            expected     = "123";
            CalculatorControl addingNumber = new CalculatorControl();

            //Act
            addingNumber.addNumber(number2);
            addingNumber.addActionSymbol('+');
            addingNumber.addNumber(number2);

            //Assert
            Assert.AreEqual(addingNumber.SecondNumber, expected);
        }
Ejemplo n.º 2
0
        public void AddingNumber2()
        {
            //Arrange
            string            number2      = "123";
            CalculatorControl addingNumber = new CalculatorControl();

            //Act
            addingNumber.addNumber(number2);

            //Assert
            Assert.IsNull(addingNumber.SecondNumber);
        }
Ejemplo n.º 3
0
        public void AddingNumber()
        {
            //Arrange
            string            number1      = "123";
            string            expected     = "123";
            CalculatorControl addingNumber = new CalculatorControl();

            //Act
            addingNumber.addNumber(number1);

            //Assert
            Assert.AreEqual(addingNumber.FirstNumber, expected);
        }
Ejemplo n.º 4
0
        public void AddingSymbol()
        {
            //Arrange
            string            number       = "123";
            char              symbol       = '+';
            char              expected     = '+';
            CalculatorControl addingSymbol = new CalculatorControl();

            //Act
            addingSymbol.addNumber(number);
            addingSymbol.addActionSymbol(symbol);

            //Assert
            Assert.AreEqual(addingSymbol.ActionSymbol, expected);
        }