Method IsTestClassDisposable
- Namespace
- Xunit.v3
- Assembly
- xunit.v3.core.dll
IsTestClassDisposable(TContext, object)
Determine whether a test class instance should be disposed. The pipeline will only call
DisposeTestClassInstance(TContext, object) if this returns true. By default, looks to
see if the class implements IAsyncDisposable or IDisposable.
protected virtual bool IsTestClassDisposable(TContext ctxt, object testClassInstance)
Parameters
ctxtTContextThe context that describes the current test
testClassInstanceobjectThe test class instance
Returns
Remarks
This method runs during Running and any exceptions thrown will contribute to test failure.