Table of Contents

Class CollectionPerClassTestCollectionFactory

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

Implementation of IXunitTestCollectionFactory which creates a new test collection for each test class that isn't decorated with CollectionAttribute or CollectionAttribute<TCollectionDefinition>.

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

Constructors

CollectionPerClassTestCollectionFactory(IXunitTestAssembly)

Implementation of IXunitTestCollectionFactory which creates a new test collection for each test class that isn't decorated with CollectionAttribute or CollectionAttribute<TCollectionDefinition>.

public CollectionPerClassTestCollectionFactory(IXunitTestAssembly testAssembly)

Parameters

testAssembly IXunitTestAssembly

The test 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