Beispiel #1
0
        public void End()
        {
            lock (this) {
                if (isActive == false)
                {
                    //End msg arrive earlier than Start msg, wait Start msg to be processed
                    Monitor.Wait(this);
                }
                if (isActive)
                {
                    if (reportToMonitor)
                    {
                        context.Monitor.EndTest(unitTest, result);
                        unitTest.Status = TestStatus.Ready;
                        unitTest.RegisterResult(context, result);
                    }

                    // notify the parent session after finishing the test itself
                    if (parentSession != null)
                    {
                        parentSession.OnChildSessionFinished(this);
                    }

                    isActive = false;
                }
            }
        }
Beispiel #2
0
        public void End()
        {
            if (isActive)
            {
                if (reportToMonitor)
                {
                    context.Monitor.EndTest(unitTest, result);
                    unitTest.Status = TestStatus.Ready;
                    unitTest.RegisterResult(context, result);
                }

                // notify the parent session after finishing the test itself
                if (parentSession != null)
                {
                    parentSession.OnChildSessionFinished(this);
                }

                isActive = false;
            }
        }