<PackageReference Include="NUnit" Version="3.7.1" />

CategoryAttribute

Attribute used to apply a category to a test
protected string categoryName

The name of the category

public string Name { get; }

The name of the category

public CategoryAttribute(string name)

Construct attribute for a given category based on a name. The name may not contain the characters ',', '+', '-' or '!'. However, this is not checked in the constructor since it would cause an error to arise at as the test was loaded without giving a clear indication of where the problem is located. The error is handled in NUnitFramework.cs by marking the test as not runnable.

protected CategoryAttribute()

Protected constructor uses the Type name as the name of the category.

public void ApplyToTest(Test test)

Modifies a test by adding a category to it.