Table of Contents

Class AssemblyFixtureAttribute

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.

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

Constructors

AssemblyFixtureAttribute(Type)

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.

Properties

AssemblyFixtureType

Gets the fixture type.