Class ExplicitAttribute
Marks an assembly, test fixture or test method such that it will only run if explicitly executed from the GUI, command line or included within a test filter. The test will not be run simply because an enclosing suite is run.
Implements
Inherited Members
Namespace: NUnit.Framework
Assembly: nunit.framework.dll
Syntax
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class ExplicitAttribute : NUnitAttribute, IApplyToTest
Constructors
View SourceExplicitAttribute()
Default constructor
Declaration
public ExplicitAttribute()
ExplicitAttribute(string?)
Constructor with a reason
Declaration
public ExplicitAttribute(string? reason)
Parameters
Type | Name | Description |
---|---|---|
string | reason | The reason test is marked explicit |
Methods
View SourceApplyToTest(Test)
Modifies a test by marking it as explicit.
Declaration
public void ApplyToTest(Test test)
Parameters
Type | Name | Description |
---|---|---|
Test | test | The test to modify |