Table of Contents

Class CollectionAttribute

Namespace
Xunit
Assembly
xunit.v3.core.aot.dll

Used to declare a specific test collection for a test class.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public sealed class CollectionAttribute : CollectionAttributeBase
Inheritance
CollectionAttributeBase
CollectionAttribute
Inherited Members

Constructors

CollectionAttribute(string)

Initializes a new instance of the CollectionAttribute class, with the given collection name.

CollectionAttribute(Type)

Initializes a new instance of the CollectionAttribute class based on a collection definition type, with an auto-generated name based on that type. Equivalent to using CollectionAttribute<TCollectionDefinition>.

Methods

GetCollectionNameForType(Type)

Gets the collection name that will result for a given type.