Table of Contents

Class CollectionPerAssemblyTestCollectionFactory

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

Implementation of IXunitTestCollectionFactory that creates a single default test collection for the assembly, and places any tests classes which are not decorated by CollectionAttribute or CollectionAttribute<TCollectionDefinition> into the default test collection.

public class CollectionPerAssemblyTestCollectionFactory : TestCollectionFactoryBase, IXunitTestCollectionFactory
Inheritance
CollectionPerAssemblyTestCollectionFactory
Implements
Inherited Members

Constructors

CollectionPerAssemblyTestCollectionFactory(IXunitTestAssembly)

Initializes a new instance of the CollectionPerAssemblyTestCollectionFactory class.

public CollectionPerAssemblyTestCollectionFactory(IXunitTestAssembly testAssembly)

Parameters

testAssembly IXunitTestAssembly

The assembly.

Properties

DisplayName

Gets the display name for the test collection factory. This information is shown to the end user as part of the description of the test environment.

public override string DisplayName { get; }

Property Value

string

Methods

GetDefaultTestCollection(Type)

Override to provide a test collection when the given test class is not decorated with any test collection attributes.

protected override IXunitTestCollection GetDefaultTestCollection(Type testClass)

Parameters

testClass Type

The test class

Returns

IXunitTestCollection