Поделиться через


GlobalTestCleanupAttribute Class

Definition

A global test cleanup attribute that applies to every test method in the assembly. The method to which this attribute is applied must be public, static, non-generic, has a single parameter of type TestContext, and either returns void or a Task.

[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
public sealed class GlobalTestCleanupAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
type GlobalTestCleanupAttribute = class
    inherit Attribute
Public NotInheritable Class GlobalTestCleanupAttribute
Inherits Attribute
Inheritance
GlobalTestCleanupAttribute
Attributes

Remarks

Multiple methods with this attribute in the assembly is allowed, but there is no guarantee of the order in which they will be executed.

Applies to