Class IncludeExcludeAttribute
Abstract base for attributes that are used to include tests in the test run based on environmental settings.
Inheritance
IncludeExcludeAttribute
Inherited Members
Namespace: NUnit.Framework
Assembly: nunit.framework.dll
Syntax
public abstract class IncludeExcludeAttribute : NUnitAttribute
Constructors
View SourceIncludeExcludeAttribute()
Constructor with no included items specified, for use with named property syntax.
Declaration
protected IncludeExcludeAttribute()
IncludeExcludeAttribute(string?)
Constructor taking one or more included items
Declaration
protected IncludeExcludeAttribute(string? include)
Parameters
| Type | Name | Description |
|---|---|---|
| string | include | Comma-delimited list of included items |
IncludeExcludeAttribute(string[])
Constructor taking an array of included items
Declaration
protected IncludeExcludeAttribute(string[] includes)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | includes | Array included items |
Properties
View SourceExclude
Name of the item to be excluded. Multiple items may be given, separated by a comma.
Declaration
public string? Exclude { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Excludes
An array of items to be excluded.
Declaration
public string[] Excludes { get; set; }
Property Value
| Type | Description |
|---|---|
| string[] |
Include
Name of the item that is needed in order for a test to run. Multiple items may be given, separated by a comma.
Declaration
public string? Include { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Includes
An array of items to be included.
Declaration
public string[] Includes { get; set; }
Property Value
| Type | Description |
|---|---|
| string[] |
Reason
The reason for including or excluding the test
Declaration
public string? Reason { get; set; }
Property Value
| Type | Description |
|---|---|
| string |