Exemple #1
0
 /// <summary>
 /// Raises an event when something happens during testing.
 /// </summary>
 private void RaiseEvent(TestSequenceEventArgs args)
 {
     lock (m_lock)
     {
         if (m_TestSequenceEvent != null)
         {
             m_TestSequenceEvent(this, args);
         }
     }
 }
Exemple #2
0
        void TestClient_TestSequenceEvent(TestClient client, TestSequenceEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke(new TestSequenceEventHandler(TestClient_TestSequenceEvent), client, e);
                return;
            }

            try
            {
                if (e.TestCaseName == "Done")
                {
                    TestCancelMI.Enabled = false;

                    if (!m_client.Cancel)
                    {
                        if (m_endpointsToTest.Count > 0)
                        {
                            Connect(m_endpointsToTest.Dequeue(), m_currentOptions.UseAnsiCStack, m_currentOptions.KeySize);
                            return;
                        }

                        if (m_clientsToTest.Count > 0)
                        {
                            StartTest(m_clientsToTest.Dequeue());
                            return;
                        }
                    }

                    m_endpointsToTest.Clear();
                    m_clientsToTest.Clear();

                    TestEvent e1 = new TestEvent();

                    e1.Timestamp = DateTime.Now;
                    e1.TestId    = 0;
                    e1.Iteration = 0;
                    e1.EventType = TestEventType.Completed;
                    e1.Details   = Utils.Format("Completed all tests.");

                    TestEventsCTRL.AddEvent(e1);
                }

                TestCaseTB.Text  = e.TestCaseName;
                TestIdTB.Text    = String.Format("{0}", e.TestId);
                IterationTB.Text = String.Format("{0}", e.Iteration);
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }
Exemple #3
0
 /// <summary>
 /// Raises an event when something happens during testing.
 /// </summary>
 private void RaiseEvent(TestSequenceEventArgs args)
 {
     lock (m_lock)
     {
         if (m_TestSequenceEvent != null)
         {
             m_TestSequenceEvent(this, args);
         }
     }
 }
Exemple #4
0
        void TestClient_TestSequenceEvent(TestClient client, TestSequenceEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke(new TestSequenceEventHandler(TestClient_TestSequenceEvent), client, e);
                return;
            }
            
            try
            {
                if (e.TestCaseName == "Done")
                {
                    TestCancelMI.Enabled = false;

                    if (!m_client.Cancel)
                    {
                        if (m_endpointsToTest.Count > 0)
                        {
                            Connect(m_endpointsToTest.Dequeue(), m_currentOptions.UseAnsiCStack, m_currentOptions.KeySize);
                            return;
                        }

                        if (m_clientsToTest.Count > 0)
                        {
                            StartTest(m_clientsToTest.Dequeue());
                            return;
                        }
                    }

                    m_endpointsToTest.Clear();
                    m_clientsToTest.Clear();

                    TestEvent e1 = new TestEvent();

                    e1.Timestamp = DateTime.Now;
                    e1.TestId = 0;
                    e1.Iteration = 0;
                    e1.EventType = TestEventType.Completed;
                    e1.Details = Utils.Format("Completed all tests.");

                    TestEventsCTRL.AddEvent(e1);
                }

                TestCaseTB.Text  = e.TestCaseName;
                TestIdTB.Text    = String.Format("{0}", e.TestId);
                IterationTB.Text = String.Format("{0}", e.Iteration);
            }
            catch (Exception exception)
            {
				GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }     
        }