示例#1
0
        public void MultiplyTest()
        {
            //arrange
            Calculator calc = new Calculator();
            int number1 = 5;
            int number2 = 7;
            int expected = 35;

            //act
            int actual = calc.Multiply(number1, number2);

            //assert
            Assert.AreEqual(expected, actual);
        }
示例#2
0
 private void multiplyButton_Click(object sender, EventArgs e)
 {
     Initialization();
     result             = aCalculator.Multiply(firstNumber, secondNumber);
     resultTextBox.Text = result.ToString();
 }
示例#3
0
 private void multiplyButton_Click(object sender, EventArgs e)
 {
     aCalculator.firstNumber  = Convert.ToDouble(firstNumberTextBox.Text);
     aCalculator.secondNumber = Convert.ToDouble(secondNumberTextBox.Text);
     resultTextBox.Text       = aCalculator.Multiply().ToString();
 }