Class AfterTestInfo
Information provided to AfterEach hooks.
public class AfterTestInfo
- Inheritance
-
AfterTestInfo
- Inherited Members
Constructors
AfterTestInfo(TestCase, int, int, bool, string, Exception, StateProfile, TimeSpan, TestingContext)
public AfterTestInfo(TestCase testCase, int testIndex, int totalTests, bool success, string failureMessage, Exception exception, StateProfile finalState, TimeSpan duration, TestingContext context)
Parameters
testCaseTestCasetestIndexinttotalTestsintsuccessboolfailureMessagestringexceptionExceptionfinalStateStateProfiledurationTimeSpancontextTestingContext
Properties
Context
The testing context. Use Context.Get<T>() to access registered services.
public TestingContext Context { get; }
Property Value
Duration
Duration of this test case.
public TimeSpan Duration { get; }
Property Value
Exception
Exception if one was thrown, null otherwise.
public Exception Exception { get; }
Property Value
FailureMessage
Failure message if the test failed, null otherwise.
public string FailureMessage { get; }
Property Value
FinalState
The final state after test execution.
public StateProfile FinalState { get; }
Property Value
Success
Whether the test passed.
public bool Success { get; }
Property Value
TestCase
The test case that was executed.
public TestCase TestCase { get; }
Property Value
TestIndex
Zero-based index of this test case.
public int TestIndex { get; }
Property Value
TotalTests
Total number of tests in this run.
public int TotalTests { get; }