Table of Contents

Method DisposeTestClassInstance

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll

DisposeTestClassInstance(TContext, object)

Disposes the test class instance. By default, will call DisposeAsync() if it's implemented, falling back to Dispose() if not.

protected virtual ValueTask DisposeTestClassInstance(TContext ctxt, object testClassInstance)

Parameters

ctxt TContext

The context that describes the current test

testClassInstance object

The test class instance

Returns

ValueTask

Remarks

This method runs during CleaningUp and any exceptions thrown will contribute to test cleanup failure.