private void FactotialButton_Click(object sender, EventArgs e) { CalcFinction s = new CalcFinction(); displayX.Text = Convert.ToString(s.Factorial(Convert.ToInt32(displayX.Text))); displayY.Clear(); }
public void FactorialTest_x3_expected_6() { //arrage int x = 3; int expected = 6; //act CalcFinction s = new CalcFinction(); double actual = s.Factorial(x); //assert Assert.AreEqual(expected, actual); }