Table of Contents

Class AssemblyFixtureAttribute<TFixture>

Namespace
Xunit
Assembly
xunit.v3.core.dll

Used to decorate xUnit.net test assemblies to indicate per-assembly fixture data. An instance of the fixture data is initialized before any test in the assembly are run (including InitializeAsync() if it's implemented). After all the tests in the assembly have been run, it is cleaned up by calling DisposeAsync() if it's implemented, or it falls back to Dispose() if that's implemented. Assembly fixtures must have a public parameterless constructor. To gain access to the fixture data from inside the test, a constructor argument should be added to the test class which exactly matches the fixture type.

public sealed class AssemblyFixtureAttribute<TFixture> : AssemblyFixtureAttribute, IAssemblyFixtureAttribute

Type Parameters

TFixture

The assembly fixture class type

Inheritance
AssemblyFixtureAttribute<TFixture>
Implements
Inherited Members

Remarks

.NET Framework does not support generic attributes. Please use the non-generic AssemblyFixtureAttribute when targeting .NET Framework.

Constructors

AssemblyFixtureAttribute()