/// <summary> /// REsult /// </summary> private void button16_Click(object sender, EventArgs e) { this.secondNumber = decimal.Parse(currentNumber); decimal result = 0; switch (operation) { case "+": result = calc.Suma(firstNumber, secondNumber); break; case "-": result = calc.Resta(firstNumber, secondNumber); break; case "/": result = calc.Division(firstNumber, secondNumber); break; case "*": result = calc.Multiplicacion(firstNumber, secondNumber); break; } this.firstNumber = 0; this.secondNumber = 0; textBox1.Text = result.ToString(); (sender as Button).FlatStyle = FlatStyle.Standard; }
public void MultiplicacionTest() { var result = calculator.Multiplicacion(5, 5); Assert.AreEqual(25, result, "Resultados diferentes!"); }
public decimal Multiplicacion(decimal multiplicando, decimal multiplicador) { return(calc.Multiplicacion(multiplicando, multiplicador)); }