public static void OnTestEvent(TestEventArgs e)
        {
            if (TestEvent != null)
            {
                TestEvent(e);
            }

            Log(String.Format("{0}", e.ToString()));
        }
 void SQLFTestRunner_TestEvent(TestEventArgs e)
 {
     if (e.ToString() == "Done")
     {
         SQLFTestRunner.TestEvent -= new SQLFTestRunner.TestEventHandler(SQLFTestRunner_TestEvent);
         buttonStart.Enabled = true;
         buttonStop.Enabled = false;
         button1.Enabled = true;
         comboBox1.Enabled = true;
         runner = null;
     }
     listBoxMsg.Items.Add(e.ToString());
 }
Example #3
0
        protected void Complete(Object context)
        {
            TestEventArgs e = new TestEventArgs(this.GetType().FullName,
                                                TestState.Finished.ToString(), tstResult.ToString(), "Finished");

            GFXDTestRunner.OnTestEvent(e);

            lock (context)
            {
                GFXDTestRunner.TestCount -= 1;

                if (GFXDTestRunner.TestCount == 0)
                {
                    if (resetEvent != null)
                    {
                        resetEvent.Set();
                    }
                }
            }

            Log(String.Format("Test {0} completed. Result: {1}",
                              this.GetType().FullName, tstResult));

            try
            {
                if ((Connection != null) && (!Connection.IsClosed) &&
                    (Connection.State != ConnectionState.Executing))
                {
                    Connection.Close();
                }
            }
            catch (Exception ex)
            {
                Log(ex);
            }
        }
Example #4
0
        protected void Complete(Object context)
        {            
            TestEventArgs e = new TestEventArgs(this.GetType().FullName, 
                TestState.Finished.ToString(), tstResult.ToString(), "Finished");

            GFXDTestRunner.OnTestEvent(e);

            lock (context)
            {
                GFXDTestRunner.TestCount -= 1;

                if (GFXDTestRunner.TestCount == 0)
                {
                    if(resetEvent != null)
                        resetEvent.Set();
                }
            }

            Log(String.Format("Test {0} completed. Result: {1}", 
                this.GetType().FullName, tstResult));

            try
            {
                if ((Connection != null) && (!Connection.IsClosed)
                    && (Connection.State != ConnectionState.Executing))
                    Connection.Close();
            }
            catch (Exception ex)
            {                
                Log(ex);
            }
        }
        public static void OnTestEvent(TestEventArgs e)
        {
            if(TestEvent != null)
                TestEvent(e);

            Log(String.Format("{0}", e.ToString()));
        }