void OnTestFinished(object sender, UnitTestEventArgs e) { var session = (UnitTestSession)sender; var theoryElement = e.Element as XunitTestTheoryElement; if (theoryElement != null) { var result = session.GetResult(theoryElement); if (result != null) { result.Outdated = false; } } var methodElement = e.Element as XunitTestMethodElement; if (methodElement != null) { foreach (var theory in methodElement.Children) { var result = session.GetResult(theory); if (result != null && result.Outdated) { theory.State = UnitTestElementState.Invalid; } } } }
void OnTestFinished(object sender, UnitTestEventArgs e) { var session = (UnitTestSession)sender; var theoryElement = e.Element as XunitTestTheoryElement; if (theoryElement != null) { var result = session.GetResult(theoryElement); if (result != null) result.Outdated = false; } var methodElement = e.Element as XunitTestMethodElement; if (methodElement != null) { foreach (var theory in methodElement.Children) { var result = session.GetResult(theory); if (result != null && result.Outdated) theory.State = UnitTestElementState.Invalid; } } }