public void RecordState() { TestState state; switch (TestContext.CurrentTestOutcome) { case UnitTestOutcome.Error: case UnitTestOutcome.Failed: case UnitTestOutcome.Timeout: state = TestState.Failed; break; case UnitTestOutcome.Passed: state = TestState.Passed; break; case UnitTestOutcome.Inconclusive: state = TestState.Ignored; break; default: state = TestState.Unknown; break; } _testStateManager.SetThenState(TestContext.TestName, state, Message ?? string.Empty); if (_testStateManager.Thens.All(x => x.Value.State != TestState.Unknown)) { _testStateManager.Cleanup(); } }
public void TearDown() { _testStateManager.Cleanup(); }