Skip to content

False positives for TestInitialize/TestCleanup analyzers #3276

Closed
@Evangelink

Description

@Evangelink

Describe the bug

TestInitialize/TestCleanup on a generic class is a valid scenario.

Steps To Reproduce

[TestClass]
    public class UnitTest1 : Base<int>
    {
        [TestMethod]
        public void TestMethod1()
        {
        }
    }

    public class Base<T>
    {
        [TestInitialize]
        public void Init()
        {
        }
    }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions