public void Completed(RuntimeTestResult activeTest, Exception error)
 {
     if (_activeTestGroup == null || _activeTestGroup.Active != activeTest)
     {
         return;
     }
     _activeTestGroup.CompletedActiveTest(false, error);
 }
 public void Completed(RuntimeTestResult activeTest)
 {
     if (_activeTestGroup == null || _activeTestGroup.Active != activeTest)
     {
         return;
     }
     _activeTestGroup.CompletedActiveTest();
 }
        public RuntimeTestResult CompletedActiveTest(bool success = true, Exception error = null)
        {
            if (_active == null)
            {
                return(null);
            }
            var rtn = _active;

            _active.State = success ? RuntimeTestState.Success : RuntimeTestState.Failed;
            _active.Error = error;
            Results.Add(_active);
            _output.Completed(_active);
            _active = null;
            return(rtn);
        }
        public RuntimeTestResult StartNextTest()
        {
            if (_active != null)
            {
                CompletedActiveTest(false);
            }

            var next = Pending.Count > 0 ? Pending.Dequeue() : null;

            if (next != null)
            {
                next.State      = RuntimeTestState.Running;
                TestCase.Active = next;
            }

            _active = next;
            return(next);
        }