Exemplo n.º 1
0
 public void  Assert(bool passed, string message)
 {
     if (passed)
     {
         TestDiagnostics.Instance().TestPass(message);
     }
     else
     {
         TestDiagnostics.Instance().TestFail(message);
     }
 }
Exemplo n.º 2
0
 public static TestDiagnostics Instance()
 {
     if (s_TestTracker != null)
     {
         return(s_TestTracker);
     }
     lock (m_Singletonsynch)
     {
         if (s_TestTracker == null)
         {
             s_TestTracker = new TestDiagnostics();
         }
     }
     return(s_TestTracker);
 }
Exemplo n.º 3
0
        public void Execute()
        {
            int numberOfProcess = IdentifyForms();

            if (m_FormsToHook.Count == 0)
            {
                m_Logger.LogError("No Test cases have targeted any forms. Did you miss TargetForm attribute on your test case classes? ");
                return;
            }
            TestDiagnostics.Instance().TotalProcess = numberOfProcess;
            StartServer();
            HookProcess();
            m_Logger.LogError("Test Server Waiting...");

            //Now the TCpServerthread will take care
            while (TestDiagnostics.Instance().TestsRunning)
            {
                Thread.Sleep(1000);
            }

            m_Logger.LogInfo("All Test Cases Completed");
            if (TestDiagnostics.Instance().PassedTC > 0)
            {
                m_Logger.LogTestCaseStatus(true, "Test Cases Passed: " + TestDiagnostics.Instance().PassedTC.ToString());
            }
            else
            {
                m_Logger.LogInfo("Test Cases Passed: " + TestDiagnostics.Instance().PassedTC.ToString());
            }

            if (TestDiagnostics.Instance().FailedTC > 0)
            {
                m_Logger.LogTestCaseStatus(false, "Test Cases Failed: " + TestDiagnostics.Instance().FailedTC.ToString());
            }
            else
            {
                m_Logger.LogInfo("Test Cases Failed: " + TestDiagnostics.Instance().FailedTC.ToString());
            }
        }
Exemplo n.º 4
0
 public void TestFixtureError(string message)
 {
     TestDiagnostics.Instance().TestFixtureError(message);
 }
Exemplo n.º 5
0
 public void TestFinished()
 {
     TestDiagnostics.Instance().IncrementTestFinished();
 }