Skip to content

Regression: Analysis warning when using abstract class with data sources #3517

Description

@dewrano

After 0.61.39 I now get the following warning: "TUnit0059: Abstract test class 'Tests' has test methods with data sources. Add [InheritsTests] on a concrete class to execute these tests."

Even though I have [InheritsTests] added. If I remove the test that has arguments, I see no warnings:

[InheritsTests]
public class Tests1 : Tests
{
    // Tests
}

[InheritsTests]
public class Tests2 : Tests 
{
    // Tests
}

public abstract class Tests
{
    [Test]
    [Arguments(true)]
    [Arguments(false)]
    public async Task TestName(bool flag)
    {
    }

    [Test]
    public async Task TestName2()
    {
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions