docs icon indicating copy to clipboard operation
docs copied to clipboard

Clarify usage of ClassCleanupBehavior.EndOfClass

Open frodofrod opened this issue 7 months ago • 0 comments

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

frodofrod avatar May 13 '25 11:05 frodofrod