Show / Hide Table of Contents

Namespace Xunit.Sdk

Classes

AfterTestFinished

Default implementation of .

AfterTestStarting

Default implementation of .

AllException

Exception thrown when an All assertion has one or more items fail an assertion.

AssemblyTraitDiscoverer

The implementation of ITraitDiscoverer which returns the trait values for AssemblyTraitAttribute.

AssertActualExpectedException

Base class for exceptions that have actual and expected values

AssertCollectionCountException

Exception thrown when the collection did not contain exactly the given number element.

BeforeAfterTestAttribute

Base attribute which indicates a test method interception (allows code to be run before and after the test is run).

BeforeTestFinished

Default implementation of .

BeforeTestStarting

Default implementation of .

CollectionException

Exception thrown when Assert.Collection fails.

ContainsException

Exception thrown when a collection unexpectedly does not contain the expected value.

DataAttribute

Abstract attribute which represents a data source for a data theory. Data source providers derive from this attribute and implement GetData to return the data for the theory. Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets.

DataDiscoverer

Default implementation of IDataDiscoverer. Uses reflection to find the data associated with DataAttribute; may return null when called without reflection-based abstraction implementations.

DataDiscovererAttribute

An attribute used to decorate classes which derive from DataAttribute, to indicate how data elements should be discovered.

DiagnosticMessage

Default implementation of .

DiscoveryCompleteMessage

Default implementation of .

DoesNotContainException

Exception thrown when a collection unexpectedly contains the expected value.

DoesNotMatchException

Exception thrown when a string unexpectedly matches a regular expression.

EmptyException

Exception thrown when a collection is unexpectedly not empty.

EndsWithException

Exception thrown when a string does not end with the expected value.

EqualException

Exception thrown when two values are unexpectedly not equal.

ErrorMessage

Default implementation of .

ExceptionAggregator

Aggregates exceptions. Intended to run one or more code blocks, and collect the exceptions thrown by those code blocks.

ExceptionUtility

Utility classes for dealing with Exception objects.

FalseException

Exception thrown when a value is unexpectedly true.

InlineDataDiscoverer

Implementation of IDataDiscoverer used to discover the data provided by InlineDataAttribute.

InRangeException

Exception thrown when a value is unexpectedly not in the given range.

IsAssignableFromException

Exception thrown when the value is unexpectedly not of the given type or a derived type.

IsNotTypeException

Exception thrown when the value is unexpectedly of the exact given type.

IsTypeException

Exception thrown when the value is unexpectedly not of the exact given type.

LongLivedMarshalByRefObject

Base class for all long-lived objects that may cross over an AppDomain.

MatchesException

Exception thrown when a string does not match a regular expression.

MemberDataDiscoverer

Implementation of IDataDiscoverer for discovering MemberDataAttribute.

NotEmptyException

Exception thrown when a collection is unexpectedly empty.

NotEqualException

Exception thrown when two values are unexpectedly equal.

NotInRangeException

Exception thrown when a value is unexpectedly in the given range.

NotNullException

Exception thrown when an object is unexpectedly null.

NotSameException

Exception thrown when two values are unexpected the same instance.

NullException

Exception thrown when an object reference is unexpectedly not null.

NullMessageSink

An implementation of and Xunit.IMessageSinkWithTypes that ignores all messages.

ParameterCountMismatchException

Exception to be thrown from theory execution when the number of parameter values does not the test method signature.

PlatformSpecificAssemblyAttribute

Marks an assembly as a platform specific assembly for use with xUnit.net. Type references from such assemblies are allowed to use a special suffix ("My.Assembly.{Platform}"), which will automatically be translated into the correct platform-specific name ("My.Assembly.desktop", "My.Assembly.win8", etc.). This affects both extensibility points which require specifying a string-based type name and assembly, as well as serialization.

In v2.1 and later, the supported platform target names include:

"desktop" (for desktop and PCL tests), "dotnet" (everything else).

In v2.0, the following names were also supported:

"iOS-Universal" (for Xamarin test projects targeting iOS), "MonoAndroid" (for Xamarin MonoAndroid tests), "MonoTouch" (for Xamarin MonoTouch tests), "universal" (for Windows Phone 8.1 and Windows 8.1 tests), "win8" (for Windows 8 tests), "wp8" (for Windows Phone 8 Silverlight tests).

For backward compatibility reasons, the v2.1 runners will support tests linked against the v2.0 execution libraries.

Note that file names may be case sensitive (when running on platforms with case sensitive file systems like Linux), so ensure that your assembly file name casing is consistent, and that you use the suffixes here with the exact case shown.

ProperSubsetException

Exception thrown when a set is not a proper subset of another set.

ProperSupersetException

Exception thrown when a set is not a proper superset of another set.

PropertyChangedException

Exception thrown when code unexpectedly fails change a property.

RaisesException

Exception thrown when code unexpectedly fails to raise an event.

RunSummary

Represents the statistical summary from a run of one or more tests.

SameException

Exception thrown when two object references are unexpectedly not the same instance.

SingleException

Exception thrown when the collection did not contain exactly one element.

SourceInformation

Default implementation of .

StartsWithException

Exception thrown when a string does not start with the expected value.

SubsetException

Exception thrown when a set is not a subset of another set.

SupersetException

Exception thrown when a set is not a superset of another set.

TestAssemblyCleanupFailure

Default implementation of TestAssemblyCleanupFailure.

TestAssemblyFinished

Default implementation of .

TestAssemblyMessage

Default implementation of and .

TestAssemblyStarting

Default implementation of .

TestCaseCleanupFailure

Default implementation of .

TestCaseDiscoveryMessage

Default implementation of .

TestCaseFinished

Default implementation of .

TestCaseMessage

Default implementation of .

TestCaseStarting

Default implementation of .

TestClassCleanupFailure

Default implementation of .

TestClassConstructionFinished

Default implementation of .

TestClassConstructionStarting

Default implementation of .

TestClassDisposeFinished

Default implementation of .

TestClassDisposeStarting

Default implementation of .

TestClassFinished

Default implementation of .

TestClassMessage

Default implementation of .

TestClassStarting

Default implementation of .

TestCleanupFailure

Default implementation of .

TestCollectionCleanupFailure

Default implementation of .

TestCollectionFinished

Default implementation of .

TestCollectionMessage

Default implementation of .

TestCollectionStarting

Default implementation of .

TestFailed

Default implementation of .

TestFinished

Default implementation of .

TestFrameworkDiscovererAttribute

Decorates an implementation of that is used to determine which test framework is used to discover and run tests.

TestMessage

Default implementation of .

TestMethodCleanupFailure

Default implementation of .

TestMethodFinished

Default implementation of .

TestMethodMessage

Default implementation of .

TestMethodStarting

Default implementation of .

TestOutput

Default implementation of .

TestPassed

Default implementation of .

TestResultMessage

Default implementation of .

TestSkipped

Default implementation of .

TestStarting

Default implementation of .

ThrowsException

Exception thrown when code unexpectedly fails to throw an exception.

TraitDiscoverer

The implementation of ITraitDiscoverer which returns the trait values for TraitAttribute.

TraitDiscovererAttribute

An attribute used to decorate classes which implement ITraitAttribute, to indicate how trait values should be discovered. The discoverer type must implement ITraitDiscoverer.

TrueException

Exception thrown when a value is unexpectedly false.

XunitException

The base assert exception class

XunitTestCaseDiscovererAttribute

An attribute used to decorate classes which derive from FactAttribute, to indicate how test cases should be discovered.

Interfaces

IDataDiscoverer

This class is responsible for discovering the data available in an implementation of DataAttribute. The discovery process may not always have access to reflection (i.e., running in Resharper), so the discoverer must make a best effort to return data, but may return null when there is not enough information available (for example, if reflection is required to answer the question).

IMessageBus

Used by discovery, execution, and extensibility code to send messages to the runner.

ITestCaseOrderer

A class implements this interface to participate in ordering tests for the test runner. Test case orderers are applied using the TestCaseOrdererAttribute, which can be applied at the assembly, test collection, and test class level.

ITestFrameworkAttribute

Marker interface that must be implemented by test framework attributes, so that the test framework attribute discoverer can find them.

ITestFrameworkTypeDiscoverer

Interface to be implemented by classes which are used to discover the test framework.

ITraitAttribute

Marker interface used by attributes which provide trait data.

ITraitDiscoverer

This interface is implemented by discoverers that provide trait values to xUnit.net v2 tests.

IXunitTestCase

Represents a single test case from xUnit.net v2.

IXunitTestCaseDiscoverer

Interface to be implemented by classes which are used to discover tests cases attached to test methods that are attributed with FactAttribute (or a subclass).

IXunitTestCollectionFactory

This interface is intended to be implemented by components which generate test collections. End users specify the desired test collection factory by applying CollectionBehaviorAttribute at the assembly level. Classes which implement this interface must have a constructor that takes and .

Enums

TestMethodDisplay

Indicates the default display name format for test methods.

TestMethodDisplayOptions

Indicates the method display options for test methods.

Back to top Generated by DocFX