Table of Contents

Class NullSourceInformationProvider

Namespace
Xunit.Runner.Common
Assembly
xunit.v3.runner.common.dll

A null implementation of ISourceInformationProvider which always returns empty source information. Get the singleton via Instance.

public sealed class NullSourceInformationProvider : ISourceInformationProvider, IAsyncDisposable
Inheritance
NullSourceInformationProvider
Implements
Inherited Members

Properties

Instance

Gets the singleton instance of the NullSourceInformationProvider.

public static NullSourceInformationProvider Instance { get; }

Property Value

NullSourceInformationProvider

Methods

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public ValueTask DisposeAsync()

Returns

ValueTask

GetSourceInformation(string?, string?)

Returns the source information for a test case.

public SourceInformation GetSourceInformation(string? testClassName, string? testMethodName)

Parameters

testClassName string

The test class name, if known

testMethodName string

The test method name, if known

Returns

SourceInformation

The source information, with null string and int values when the information is not available. Note: return value should never be null, only the interior data values inside.