Пример #1
0
        private void FactotialButton_Click(object sender, EventArgs e)
        {
            CalcFinction s = new CalcFinction();

            displayX.Text = Convert.ToString(s.Factorial(Convert.ToInt32(displayX.Text)));
            displayY.Clear();
        }
Пример #2
0
        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);
        }