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
Rule MSTEST0002 always raises an issue on generic classes but this is leading to false positives. It's perfectly valid to have a generic test class that serves as base class to other classes.
The generic class itself cannot be run which could be flagged by a different analyzer (see #2051 (comment)).
Steps To Reproduce
[TestClass]public/*abstract*/classC<T>{[ClassInitialize(InheritanceBehavior.BeforeEachDerivedClass)]publicstaticvoidCI(TestContexttestContext){}[ClassCleanup(InheritanceBehavior.BeforeEachDerivedClass)]publicstaticvoidCC(){}[TestInitialize]publicvoidTI(){}[TestCleanup]publicvoidTC(){}[TestMethod]publicvoidC1()// This won't be called from C<> but this would work through A{}}[TestClass]publicclassA:C<int>{[TestMethod]publicvoidA1(){}[TestInitialize]publicvoidATI(){}[TestCleanup]publicvoidATC(){}}
Describe the bug
Rule MSTEST0002 always raises an issue on generic classes but this is leading to false positives. It's perfectly valid to have a generic test class that serves as base class to other classes.
The generic class itself cannot be run which could be flagged by a different analyzer (see #2051 (comment)).
Steps To Reproduce
AB#1976480
The text was updated successfully, but these errors were encountered: