MSTEST0016: Test class should have test method
Property | Value |
---|---|
Rule ID | MSTEST0016 |
Title | Test class should have test method |
Category | Design |
Fix is breaking or non-breaking | Non-breaking |
Enabled by default | Yes |
Default severity | Info |
Introduced in version | 3.3.0 |
Cause
A test class should have a test method.
Rule description
A test class should have at least one test method or be static
and have methods that are attributed with [AssemblyInitialization]
or [AssemblyCleanup]
.
How to fix violations
Ensure that the test class has a test method or is static
and has methods attributed with [AssemblyInitialization]
or [AssemblyCleanup]
.
When to suppress warnings
Do not suppress a warning from this rule. If you ignore this rule, test class will be ignored.
Samarbejd med os på GitHub
Kilden til dette indhold kan findes på GitHub, hvor du også kan oprette og gennemse problemer og pullanmodninger. Du kan få flere oplysninger i vores vejledning til bidragydere.
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om