Ejemplo n.º 1
0
 public void  Assert(bool passed, string message)
 {
     if (passed)
     {
         TestDiagnostics.Instance().TestPass(message);
     }
     else
     {
         TestDiagnostics.Instance().TestFail(message);
     }
 }
Ejemplo n.º 2
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());
            }
        }
Ejemplo n.º 3
0
 public void TestFixtureError(string message)
 {
     TestDiagnostics.Instance().TestFixtureError(message);
 }
Ejemplo n.º 4
0
 public void TestFinished()
 {
     TestDiagnostics.Instance().IncrementTestFinished();
 }