Class TestActionAttribute
Abstract attribute providing actions to execute before and after tests.
Implements
Inherited Members
Namespace: NUnit.Framework
Assembly: nunit.framework.dll
Syntax
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Interface, AllowMultiple = true, Inherited = true)]
public abstract class TestActionAttribute : Attribute, ITestAction
Constructors
View SourceTestActionAttribute()
Declaration
protected TestActionAttribute()
Properties
View SourceTargets
Provides the target for the action attribute
Declaration
public virtual ActionTargets Targets { get; }
Property Value
Type | Description |
---|---|
ActionTargets |
Methods
View SourceAfterTest(ITest)
Executed after each test is run
Declaration
public virtual void AfterTest(ITest test)
Parameters
Type | Name | Description |
---|---|---|
ITest | test | The test that has just been run. |
BeforeTest(ITest)
Executed before each test is run
Declaration
public virtual void BeforeTest(ITest test)
Parameters
Type | Name | Description |
---|---|---|
ITest | test | The test that is going to be run. |