Table of Contents

AddXunitTestLoggingOutputHelperAccessor Method

Definition

Namespace
Codebelt.Extensions.Xunit.Hosting
Assemblies
Codebelt.Extensions.Xunit.Hosting.dll
Source
src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs

AddXunitTestLoggingOutputHelperAccessor(IServiceCollection)

Adds a default implementation of ITestOutputHelperAccessor to the services collection.

public static IServiceCollection AddXunitTestLoggingOutputHelperAccessor(this IServiceCollection services)

Parameters

services IServiceCollection

The IServiceCollection to extend.

Returns

IServiceCollection

A reference to services so that additional configuration calls can be chained.

AddXunitTestLoggingOutputHelperAccessor<T>(IServiceCollection)

Adds a specified implementation of ITestOutputHelperAccessor to the services collection.

public static IServiceCollection AddXunitTestLoggingOutputHelperAccessor<T>(this IServiceCollection services) where T : class, ITestOutputHelperAccessor

Parameters

services IServiceCollection

The IServiceCollection to extend.

Returns

IServiceCollection

A reference to services so that additional configuration calls can be chained.

Type Parameters

T

The type of the implementation of ITestOutputHelperAccessor.

Exceptions

ArgumentNullException

services cannot be null.