Ejemplo n.º 1
0
 private void OnTestsFinished(TestReport testReport)
 {
     if (_isAborting)
     {
         _dispatcher.BeginInvoke(() => TestsAborted?.Invoke(this, EventArgs.Empty));
     }
     else if (testReport != null)
     {
         _dispatcher.BeginInvoke(() => TestsFinished?.Invoke(this, new EventArgs <TestReport>(testReport)));
     }
     else
     {
         _dispatcher.BeginInvoke(() => TestsFailed?.Invoke(this, EventArgs.Empty));
     }
 }
        public MultiplexedTestRunner(IUnityContainer container, IOptions options) : base(container)
        {
            _options = options;
            UpdateImplementation();

            foreach (var implementation in _implementations.Values)
            {
                implementation.DebuggingStarted += (o, e) => DebuggingStarted?.Invoke(this, e);
                implementation.TestStarted      += (o, e) => TestStarted?.Invoke(this, e);
                implementation.TestExecuted     += (o, e) => TestExecuted?.Invoke(this, e);
                implementation.TestLogAdded     += (o, e) => TestLogAdded?.Invoke(this, e);
                implementation.TestsAborted     += (o, e) => TestsAborted?.Invoke(this, e);
                implementation.TestsFailed      += (o, e) => TestsFailed?.Invoke(this, e);
                implementation.TestsFinished    += (o, e) => TestsFinished?.Invoke(this, e);
                implementation.TestsStarted     += (o, e) => TestsStarted?.Invoke(this, e);
            }

            options.PropertyChanged += OnOptionChanged;
        }