You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning (active) MSTEST0008 Methods marked with [TestInitialize] should follow the following layout to be valid:
- be 'public'
- not be 'static'
- not be generic nor defined on a generic class
- not be 'abstract'
- not take any parameter
- return type should be 'void', 'Task' or 'ValueTask'
- not be 'async void'
- not be a special method (finalizer, operator...)
Steps To Reproduce
publicsealedclassMyExample1Test{[TestInitialize]publicvoidInit(){}// MSTEST0008}[TestClass]publicsealedclassMyExample2Test{[TestInitialize]publicvoidInit(){}// allowed, because [TestClass]}publicabstractclassMyExample3Test{[TestInitialize]publicvoidInit(){}// allowed, because abstract}
Expected behavior
Diagnostic Message should include (a) line(s) like:
- be defined in a `abstract` class or a class with a `TestClassAttribute`
Actual behavior
no mention of abstract/ TestClassAttribute leads to confusion
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
Description states:
Steps To Reproduce
Expected behavior
Diagnostic Message should include (a) line(s) like:
Actual behavior
no mention of
abstract
/TestClassAttribute
leads to confusionAdditional context
The text was updated successfully, but these errors were encountered: