Table of Contents

Interface IBeforeAfterTestAttribute

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll

Indicates an attribute which is involved in test method interception (allows code to be run before and after a test is run).

public interface IBeforeAfterTestAttribute

Methods

After(MethodInfo, IXunitTest)

This method is called after the test method is executed.

void After(MethodInfo methodUnderTest, IXunitTest test)

Parameters

methodUnderTest MethodInfo

The method under test

test IXunitTest

The current ITest

Before(MethodInfo, IXunitTest)

This method is called before the test method is executed.

void Before(MethodInfo methodUnderTest, IXunitTest test)

Parameters

methodUnderTest MethodInfo

The method under test

test IXunitTest

The current ITest