Class CollectionDefinitionAttribute
- Namespace
- Xunit
- Assembly
- xunit.v3.core.dll
Used to declare a test collection container class. The container class gives developers a place to attach interfaces like IClassFixture<TFixture> and ICollectionFixture<TFixture> that will be applied to all tests classes that are members of the test collection.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class CollectionDefinitionAttribute : Attribute
- Inheritance
-
CollectionDefinitionAttribute
- Inherited Members
Constructors
- CollectionDefinitionAttribute()
Initializes a new instance of the CollectionDefinitionAttribute class. Use this constructor when collection references by test classes use the generic CollectionAttribute<TCollectionDefinition> attribute or refer to the fixture class using CollectionAttribute(Type).
- CollectionDefinitionAttribute(string)
Initializes a new instance of the CollectionDefinitionAttribute class. Use this constructor when collection references by test classes use CollectionAttribute(string).
Properties
- DisableParallelization
Determines whether tests in this collection runs in parallel with any other collections.
- Name
Gets the collection defintion name, if one was provided.