Table of Contents

Class ExplicitAttribute

Namespace
NUnit.Framework
Assembly
nunit.framework.dll

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.

[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class ExplicitAttribute : NUnitAttribute, IApplyToTest
Inheritance
ExplicitAttribute
Implements
Inherited Members

Constructors

ExplicitAttribute()

Default constructor

public ExplicitAttribute()

ExplicitAttribute(string?)

Constructor with a reason

public ExplicitAttribute(string? reason)

Parameters

reason string

The reason test is marked explicit

Methods

ApplyToTest(Test)

Modifies a test by marking it as explicit.

public void ApplyToTest(Test test)

Parameters

test Test

The test to modify