Class ExecutionHookMethodsAttribute
Abstract base attribute class for defining execution hooks methods.
Inherited Members
Namespace: NUnit.Framework
Assembly: nunit.framework.dll
Syntax
public abstract class ExecutionHookMethodsAttribute : NUnitAttribute
Constructors
View SourceExecutionHookMethodsAttribute()
Declaration
protected ExecutionHookMethodsAttribute()
Methods
View SourceAfterEverySetUpHook(HookData)
Method that is called immediately after every [SetUp] or [OneTimeSetUp] method is executed. Override this to implement custom logic to run after the setup.
Declaration
public virtual void AfterEverySetUpHook(HookData hookData)
Parameters
| Type | Name | Description |
|---|---|---|
| HookData | hookData | The current NUnit.Framework.Internal.ExecutionHooks.HookData for the test. |
AfterEveryTearDownHook(HookData)
Method that is called immediately after every [TearDown] or [OneTimeTearDown] method is executed. Override this to implement custom logic to run after the teardown.
Declaration
public virtual void AfterEveryTearDownHook(HookData hookData)
Parameters
| Type | Name | Description |
|---|---|---|
| HookData | hookData | The current NUnit.Framework.Internal.ExecutionHooks.HookData for the test. |
AfterTestActionAfterTestHook(HookData)
Method that is called immediately after the AfterTest(ITest test) method of a ITestAction is executed
Declaration
public virtual void AfterTestActionAfterTestHook(HookData hookData)
Parameters
| Type | Name | Description |
|---|---|---|
| HookData | hookData | The current NUnit.Framework.Internal.ExecutionHooks.HookData for the test. |
AfterTestActionBeforeTestHook(HookData)
Method that is called immediately before the AfterTest(ITest test) method of a ITestAction is executed
Declaration
public virtual void AfterTestActionBeforeTestHook(HookData hookData)
Parameters
| Type | Name | Description |
|---|---|---|
| HookData | hookData | The current NUnit.Framework.Internal.ExecutionHooks.HookData for the test. |
AfterTestHook(HookData)
Method that is called immediately after the test is executed. Override this to implement custom logic to run after the test.
Declaration
public virtual void AfterTestHook(HookData hookData)
Parameters
| Type | Name | Description |
|---|---|---|
| HookData | hookData | The current NUnit.Framework.Internal.ExecutionHooks.HookData for the test. |
BeforeEverySetUpHook(HookData)
Method that is called immediately before every [SetUp] or [OneTimeSetUp] method is executed. Override this to implement custom logic to run before the test.
Declaration
public virtual void BeforeEverySetUpHook(HookData hookData)
Parameters
| Type | Name | Description |
|---|---|---|
| HookData | hookData | The current NUnit.Framework.Internal.ExecutionHooks.HookData for the test. |
BeforeEveryTearDownHook(HookData)
Method that is called immediately before every [TearDown] or [OneTimeTearDown] method is executed. Override this to implement custom logic to run before the teardown.
Declaration
public virtual void BeforeEveryTearDownHook(HookData hookData)
Parameters
| Type | Name | Description |
|---|---|---|
| HookData | hookData | The current NUnit.Framework.Internal.ExecutionHooks.HookData for the test. |
BeforeTestActionAfterTestHook(HookData)
Method that is called immediately after the BeforeTest(ITest test) method of a ITestAction is executed
Declaration
public virtual void BeforeTestActionAfterTestHook(HookData hookData)
Parameters
| Type | Name | Description |
|---|---|---|
| HookData | hookData | The current NUnit.Framework.Internal.ExecutionHooks.HookData for the test. |
BeforeTestActionBeforeTestHook(HookData)
Method that is called immediately before the BeforeTest(ITest test) method of a ITestAction is executed
Declaration
public virtual void BeforeTestActionBeforeTestHook(HookData hookData)
Parameters
| Type | Name | Description |
|---|---|---|
| HookData | hookData | The current NUnit.Framework.Internal.ExecutionHooks.HookData for the test. |
BeforeTestHook(HookData)
Method that is called immediately before the test is executed. Override this to implement custom logic to run before the test.
Declaration
public virtual void BeforeTestHook(HookData hookData)
Parameters
| Type | Name | Description |
|---|---|---|
| HookData | hookData | The current NUnit.Framework.Internal.ExecutionHooks.HookData for the test. |