Table of Contents

Test Class

Definition

Namespace
Codebelt.Extensions.Xunit
Assemblies
Codebelt.Extensions.Xunit.dll
Source
src/Codebelt.Extensions.Xunit/Test.cs

Represents the base class from which all implementations of unit testing should derive.

public abstract class Test : ITest, IDisposable, IAsyncLifetime, IAsyncDisposable
Inheritance
Test
Implements
IAsyncLifetime
Derived

Constructors

Name Description
Test(ITestOutputHelper, Type)

Initializes a new instance of the Test class.

Properties

Name Description
CallerType

Gets the type of caller for this instance. Default is GetType().

Disposed

Gets a value indicating whether this Test object is disposed.

HasTestOutput

Gets a value indicating whether TestOutput has a reference to an implementation of Xunit.ITestOutputHelper.

TestOutput

Gets the console substitute to write out unit test information.

Methods

Name Description
Dispose()

Releases all resources used by the Test object.

Dispose(bool)

Releases the unmanaged resources used by the Test object and optionally releases the managed resources.

DisposeAsync()

Asynchronously releases the resources used by the Test.

InitializeAsync()

Called immediately after the class has been created, before it is used.

Match(string, string, Action<WildcardOptions>)

Provides a way, with wildcard support, to determine if actual matches expected.

OnDisposeManagedResources()

Called when this object is being disposed by either Dispose() or Dispose(bool) having disposing set to true and Disposed is false.

OnDisposeManagedResourcesAsync()

Called when this object is being disposed by DisposeAsync().

OnDisposeUnmanagedResources()

Called when this object is being disposed by either Dispose() or Dispose(bool) and Disposed is false.

See Also

ITestOutputHelper