Table of Contents

Class AfterTestInfo

Namespace
Microsoft.Accordant
Assembly
Accordant.Operations.dll

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

testCase TestCase
testIndex int
totalTests int
success bool
failureMessage string
exception Exception
finalState StateProfile
duration TimeSpan
context TestingContext

Properties

Context

The testing context. Use Context.Get<T>() to access registered services.

public TestingContext Context { get; }

Property Value

TestingContext

Duration

Duration of this test case.

public TimeSpan Duration { get; }

Property Value

TimeSpan

Exception

Exception if one was thrown, null otherwise.

public Exception Exception { get; }

Property Value

Exception

FailureMessage

Failure message if the test failed, null otherwise.

public string FailureMessage { get; }

Property Value

string

FinalState

The final state after test execution.

public StateProfile FinalState { get; }

Property Value

StateProfile

Success

Whether the test passed.

public bool Success { get; }

Property Value

bool

TestCase

The test case that was executed.

public TestCase TestCase { get; }

Property Value

TestCase

TestIndex

Zero-based index of this test case.

public int TestIndex { get; }

Property Value

int

TotalTests

Total number of tests in this run.

public int TotalTests { get; }

Property Value

int