Ejemplo n.º 1
0
        // Sometimes it pays to place a test in a separate
        // class so you can check just that functionality.
        public void TestDivideByZero()
        {
            string Expected = "0";
            string Result   = MathCheck.DoDivide("6", "0");

            Assert(Expected.Equals(Result));
        }
Ejemplo n.º 2
0
        // Test the subtract function using a simple example.
        public void TestSubtract()
        {
            string Expected = "1";
            string Result   = MathCheck.DoSubtract("3", "2");

            Assert(Expected.Equals(Result));
        }
Ejemplo n.º 3
0
        // Test the multiply function using a simple example.
        public void TestMultiply()
        {
            string Expected = "6";
            string Result   = MathCheck.DoMultiply("2", "3");

            Assert(Expected.Equals(Result));
        }
Ejemplo n.º 4
0
        // Test the add function using a simple example.
        public void TestAdd()
        {
            string Expected = "5";
            string Result   = MathCheck.DoAdd("2", "3");

            Assert(Expected.Equals(Result));
        }