Exemple #1
0
        private void DivButton_Click(object sender, EventArgs e)
        {
            CalcFinction s = new CalcFinction();

            displayX.Text = Convert.ToString(s.Div(Convert.ToDouble(displayX.Text),
                                                   Convert.ToDouble(displayY.Text)));
            displayY.Clear();
        }
Exemple #2
0
        public void DivTest_forInt_x20dot5_y2_expected_10dot25()
        {
            //arrage

            double x = 20.5;
            double y = 2;

            double expected = 10.25;

            //act

            CalcFinction s = new CalcFinction();

            double actual = s.Div(x, y);

            //assert

            Assert.AreEqual(expected, actual);
        }