Exemple #1
0
        /* Documentation and examples for using ADO.NET:
         * http://msdn.microsoft.com/en-us/library/e80y5yhx%28v=VS.80%29.aspx
         */

        public static void testcase()
        {
            Console.WriteLine("Test cases execution started...");
            Console.WriteLine();

            TestCasesOld.Run(TestCasesOld.Test_Demo_Basic);
            TestCasesOld.Run(TestCasesOld.Test_Parameters);
            TestCasesOld.Run(TestCasesOld.Test_Various_DataTypes);



            Console.WriteLine();
            Console.WriteLine(String.Format("*** Test cases results ***"));
            Console.WriteLine(String.Format("{0} test case(s) analyzed.", testCasesCount));
            Console.WriteLine(String.Format("{0} test case(s) executed.", executed));
            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine(String.Format("{0} test case(s) passed.", passed));
            if (executed - passed > 0)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(String.Format("{0} test case(s) failed.", executed - passed));

                Console.WriteLine("The following test cases have failed:");
                foreach (string failedTestCase in failedTestCases)
                {
                    Console.ForegroundColor = ConsoleColor.Yellow;
                    Console.WriteLine(String.Format("\t{0}", failedTestCase));
                }
            }
            Console.ResetColor();
            Console.WriteLine();
        }