Exemplo n.º 1
0
        private void SubButton_Click(object sender, EventArgs e)
        {
            CalcFinction s = new CalcFinction();

            displayX.Text = Convert.ToString(s.Sub(Convert.ToDouble(displayX.Text),
                                                   Convert.ToDouble(displayY.Text)));
            displayY.Clear();
        }
Exemplo n.º 2
0
        public void SubTest_forDouble_x10dot5_y2dot5_expected_8()
        {
            //arrage

            double x = 10.5;
            double y = 2.5;

            double expected = 8;

            //act

            CalcFinction s = new CalcFinction();

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

            //assert

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
        public void SubTest_forINT_x20_y10_expected_10()
        {
            //arrage

            int x = 20;
            int y = 10;

            int expected = 10;

            //act

            CalcFinction s = new CalcFinction();

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

            //assert

            Assert.AreEqual(expected, actual);
        }