xUnit.net
Namespaces | Classes | Enumerations
Xunit Namespace Reference

Classes

class  AssemblyTraitAttribute
 Attribute used to decorate an assembly with arbitrary name/value pairs ("traits"). More...
 
class  Assert
 Contains various static methods that are used to verify that conditions are met during the process of running tests. More...
 
class  ClassDataAttribute
 Provides a data source for a data theory, with the data coming from a class which must implement IEnumerable<object[]>. Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets. More...
 
class  CollectionAttribute
 Used to declare a specific test collection for a test class. More...
 
class  CollectionBehaviorAttribute
 Used to declare the default test collection behavior for the assembly. More...
 
class  CollectionDefinitionAttribute
 Used to declare a test collection container class. The container class gives developers a place to attach interfaces like IClassFixture<T> and ICollectionFixture<T> that will be applied to all tests classes that are members of the test collection. More...
 
class  FactAttribute
 Attribute that is applied to a method to indicate that it is a fact that should be run by the test runner. It can also be extended to support a customized definition of a test method. More...
 
interface  IAsyncLifetime
 Used to provide asynchronous lifetime functionality. Currently supported: More...
 
interface  IClassFixture
 Used to decorate xUnit.net test classes and collections to indicate a test which has per-test-class fixture data. An instance of the fixture data is initialized just before the first test in the class is run, and if it implements IDisposable, is disposed after the last test in the class is run. 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 TFixture . Class fixtures must have a single parameterless constructor, and may take collection fixture types as constructor arguments. More...
 
interface  ICollectionFixture
 Used to decorate xUnit.net test classes and collections to indicate a test which has per-test-collection fixture data. An instance of the fixture data is initialized just before the first test in the collection is run, and if it implements IDisposable, is disposed after the last test in the collection is run. 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 TFixture . More...
 
class  InlineDataAttribute
 Provides a data source for a data theory, with the data coming from inline values. More...
 
interface  ITestCollectionOrderer
 A class implements this interface to participate in ordering tests for the test runner. Test collection orderers are applied using the TestCollectionOrdererAttribute, which can be applied at the assembly level. More...
 
class  MemberDataAttribute
 Provides a data source for a data theory, with the data coming from one of the following sources: More...
 
class  MemberDataAttributeBase
 Provides a base class for attributes that will provide member data. The member data must return something compatible with IEnumerable. Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets. More...
 
class  Record
 Allows the user to record actions for a test. More...
 
class  TestCaseOrdererAttribute
 Used to decorate an assembly, test collection, or test class to allow the use of a custom T:Xunit.Sdk.ITestCaseOrderer. More...
 
class  TestCollectionOrdererAttribute
 Used to decorate an assembly to allow the use of a custom T:Xunit.Sdk.ITestCollectionOrderer. More...
 
class  TestFrameworkAttribute
 Used to decorate an assembly to allow the use of a custom T:Xunit.Sdk.ITestFramework. More...
 
class  TheoryAttribute
 Marks a test method as being a data theory. Data theories are tests which are fed various bits of data from a data source, mapping to parameters on the test method. If the data source contains multiple rows, then the test method is executed multiple times (once with each data row). Data is provided by attributes which derive from DataAttribute (notably, InlineDataAttribute and MemberDataAttribute). More...
 
class  TheoryData
 Provides data for theories based on collection initialization syntax. More...
 
class  TraitAttribute
 Attribute used to decorate a test method with arbitrary name/value pairs ("traits"). More...
 

Enumerations

enum  CollectionBehavior { CollectionBehavior.CollectionPerAssembly, CollectionBehavior.CollectionPerClass }
 Defines the built-in behavior types for collections in xUnit.net. More...
 

Enumeration Type Documentation

◆ CollectionBehavior

Defines the built-in behavior types for collections in xUnit.net.

Enumerator
CollectionPerAssembly 

By default, generates a collection per assembly, and any test classes that are not decorated with CollectionAttribute will be placed into the assembly-level collection.

CollectionPerClass 

By default, generates a collection per test class for any test classes that are not decorated with CollectionAttribute.