Skip to content

Clarify usage of ClassCleanupBehavior.EndOfClass #46094

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

Open
frodofrod opened this issue May 13, 2025 · 0 comments
Open

Clarify usage of ClassCleanupBehavior.EndOfClass #46094

frodofrod opened this issue May 13, 2025 · 0 comments

Comments

@frodofrod
Copy link

frodofrod commented May 13, 2025

Type of issue

Missing information

Description

In the 'How to fix' paragraph it might be better to have

Use [ClassCleanup(ClassCleanupBehavior.EndOfClass)].

rather than

Use ClassCleanupBehavior.EndOfClass with the [ClassCleanup].

The current text assumes you are aware that the [ClassCleanup] attribute has this parameter and therefore know where to put it. Took me a few minutes to work it out.

Page URL

https://learn.microsoft.com/en-us/dotnet/core/testing/mstest-analyzers/mstest0034

Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/testing/mstest-analyzers/mstest0034.md

Document Version Independent Id

45b4191f-e2b6-b094-fd50-c74d82e90e7e

Platform Id

33a5dc5e-227d-c562-3da3-4a15caa593cd

Article author

@engyebrahim

Metadata

  • ID: 00e8ef88-ec46-216d-7898-38686bbc6ac0
  • PlatformId: 33a5dc5e-227d-c562-3da3-4a15caa593cd
  • Service: dotnet-fundamentals

Related Issues

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

No branches or pull requests

1 participant