Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow AssemblyCleanup and ClassCleanup methods to accept TestContext object #4233

Closed
Evangelink opened this issue Dec 4, 2024 · 0 comments · Fixed by #4387
Closed

Allow AssemblyCleanup and ClassCleanup methods to accept TestContext object #4233

Evangelink opened this issue Dec 4, 2024 · 0 comments · Fixed by #4387
Assignees
Labels

Comments

@Evangelink
Copy link
Member

Summary

Allow AssemblyCleanup and ClassCleanup methods to accept TestContext object.

Background and Motivation

By allowing [AssemblyCleanup] and [ClassCleanup] methods to accept a TestContext object as parameter (or not for backward compatibility), we would allow symetrical APIs and would unlock some new capabilities. For example, when using cooperative cancellation (or cooperative timeout) we need to have access to the CancellationToken object which is current impossible in the current shape.

Proposed Feature

Allow overload for the [AssemblyCleanup] and [ClassCleanup] method accepting a single parameter of type TestContext. The related analyzer and code-fix should be updated accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants