public void TestMethodSumPlus() { CalculatorBC.Calculator calculator = new CalculatorBC.Calculator(); calculator.add(2); calculator.add(2); Assert.AreEqual(calculator.GetResult(), 4); }
private void addButton_Click(object sender, EventArgs e) { var number = long.Parse(tbx_Number.Text); calculatorProcessor.add(number); tbx_Result.Text = calculatorProcessor.GetResult().ToString(); }
public void TestMethodDivideMinus() { CalculatorBC.Calculator calculator = new CalculatorBC.Calculator(); calculator.add(2); calculator.divide(2); Assert.AreNotEqual(calculator.GetResult(), 2); }