Table of Contents

Class CollectionBehaviorAttribute

Namespace
Xunit
Assembly
xunit.v3.core.dll

Default implementation of ICollectionBehaviorAttribute.

[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
public sealed class CollectionBehaviorAttribute : Attribute, ICollectionBehaviorAttribute
Inheritance
CollectionBehaviorAttribute
Implements
Inherited Members

Constructors

CollectionBehaviorAttribute()

Initializes a new instance of the CollectionBehaviorAttribute class. Uses the default collection behavior (CollectionPerClass).

CollectionBehaviorAttribute(Type)

Initializes a new instance of the CollectionBehaviorAttribute class with the given custom collection behavior.

CollectionBehaviorAttribute(CollectionBehavior)

Initializes a new instance of the CollectionBehaviorAttribute class with the given built-in collection behavior.

Properties

CollectionFactoryType

Gets the collection factory type specified by this collection behavior attribute.

DisableTestParallelization

Determines whether tests in this assembly are run in parallel.

MaxParallelThreads

Determines how many tests can run in parallel with each other. If set to 0, the system will use ProcessorCount. If set to a negative number, then there will be no limit to the number of threads.

ParallelAlgorithm

Determines the parallel algorithm used when running tests in parallel.