Class BeforeAfterTestAttribute
Base attribute which indicates a test method interception (allows code to be run before and after the test is run).
Namespace: Xunit.Sdk
Assembly: xunit.core.dll
Syntax
public abstract class BeforeAfterTestAttribute : Attribute
Methods
| Improve this Doc View SourceAfter(MethodInfo)
This method is called after the test method is executed.
Declaration
public virtual void After(MethodInfo methodUnderTest)
Parameters
Type | Name | Description |
---|---|---|
MethodInfo | methodUnderTest | The method under test |
Before(MethodInfo)
This method is called before the test method is executed.
Declaration
public virtual void Before(MethodInfo methodUnderTest)
Parameters
Type | Name | Description |
---|---|---|
MethodInfo | methodUnderTest | The method under test |