Ejemplo n.º 1
0
        public static void BeCgi(ITestListConfig allTestToDo, TestController testController)
        {
            Console.WriteLine("\r\n\r\n");
            Console.WriteLine("<html>");

            testController.DoAllTest(allTestToDo.Tests);

            if (testController.AllTestGood)
            {
                Console.WriteLine("<div style='color:green;'>");
                Console.WriteLine("Alive");
                Console.WriteLine("</div>");
                Console.WriteLine("<div style='color:green;'>");
                Console.WriteLine(DateTime.Now.ToString("O"));
                Console.WriteLine("</div>");
            }
            else
            {
                Console.WriteLine("<div style='color:red;'>");
                Console.WriteLine("Dead");
                Console.WriteLine("</div>");
                Console.WriteLine("<div style='color:red;'>");
                Console.WriteLine(DateTime.Now.ToString("O"));
                Console.WriteLine("</div>");
            }
            Console.WriteLine("</html>");
        }
Ejemplo n.º 2
0
        public static void RunRightModeOfProgram(IRunSpace space, ITestListConfig allTestToDo,out TestController testController)
        {
            testController = null;
            if (space.InIIS)
            {

                allTestToDo.GetTestList();
                testController = new TestController();
                _mainTrace.TraceEvent(TraceEventType.Information, 1031, "Be a CGI program.");
                BeCgi(allTestToDo, testController);
            }
            else
            {
                _mainTrace.TraceEvent(TraceEventType.Information, 1032, "Be a CGI program.");
                BeCmdLine(space);
            }
        }