private void SummButton_Click(object sender, EventArgs e) { CalcFinction s = new CalcFinction(); displayX.Text = Convert.ToString(s.Summ(Convert.ToDouble(displayX.Text), Convert.ToDouble(displayY.Text))); displayY.Clear(); }
public void SumTest_forDouble_xmin12dot5_y2dot5_expected_min10dot5() { //arrage double x = -12.5; double y = 2; double expected = -10.5; //act CalcFinction s = new CalcFinction(); double actual = s.Summ(x, y); //assert Assert.AreEqual(expected, actual); }
public void SumTest_forINT_x10_y10_expected_20() { //arrage int x = 10; int y = 10; int expected = 20; //act CalcFinction s = new CalcFinction(); double actual = s.Summ(x, y); //assert Assert.AreEqual(expected, actual); }