Table of Contents

Class TestActionAttribute

Namespace
NUnit.Framework
Assembly
nunit.framework.dll

Provide actions to execute before and after tests.

[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Interface, AllowMultiple = true, Inherited = true)]
public abstract class TestActionAttribute : Attribute, ITestAction
Inheritance
TestActionAttribute
Implements
Inherited Members

Constructors

TestActionAttribute()

protected TestActionAttribute()

Properties

Targets

Provides the target for the action attribute

public virtual ActionTargets Targets { get; }

Property Value

ActionTargets

The target for the action attribute

Methods

AfterTest(ITest)

Executed after each test is run

public virtual void AfterTest(ITest test)

Parameters

test ITest

The test that has just been run.

BeforeTest(ITest)

Executed before each test is run

public virtual void BeforeTest(ITest test)

Parameters

test ITest

The test that is going to be run.