protected override void OnTestFinished(UnitTestResultEventArgs e) { base.OnTestFinished(e); var result = e.Result; if (!result.Test.IsSuite) { _progressArgs.AddResult(result); OnProgress(_progressArgs); } }
protected override void OnTestFinished(UnitTestResultEventArgs e) { base.OnTestFinished(e); var result = e.Result; if (!result.Test.IsSuite) { lock (lastTestLock) { if (ShowOutput && !string.IsNullOrEmpty(result.Output)) { WriteTest(result.Test); WriteLog(result.Output); } if (result.Status != TestStatus.Passed && result.Status != TestStatus.Skipped) { WriteTest(result.Test); var assertions = result.Assersions; if (assertions != null) { foreach (var assertion in assertions) { if (assertion.Status == TestStatus.Passed) { continue; } if (!string.IsNullOrEmpty(assertion.StackTrace)) { WriteLog($"{assertion.Status}: {assertion.Message}\n{assertion.StackTrace}"); } else { WriteLog($"{assertion.Status}: {assertion.Message}"); } } } else { WriteLog($"{result.Status}: {result.Message}"); } } } } }
protected virtual void OnTestFinished(UnitTestResultEventArgs e) => TestFinished?.Invoke(this, e);
private void _inner_TestFinished(object sender, UnitTestResultEventArgs e) => OnTestFinished(e);
private void currentRunner_TestFinished(object sender, UnitTestResultEventArgs e) { OnTestFinished(e); }