Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSTEST0002 and AssemblyInitialize/AssemblyCleanup #2161

Closed
avivanoff opened this issue Jan 24, 2024 · 6 comments · Fixed by #2182
Closed

MSTEST0002 and AssemblyInitialize/AssemblyCleanup #2161

avivanoff opened this issue Jan 24, 2024 · 6 comments · Fixed by #2182

Comments

@avivanoff
Copy link

avivanoff commented Jan 24, 2024

There is one case where MSTEST0002: Test classes should have valid layout:

[TestClass]
public static class TestSetup
{
    [AssemblyInitialize]
    public static void Initialize(TestContext testContext)
    {
        ...
    }
}

MSTEST0002 is fired because TestSetup class is static.

AB#1948288

@Evangelink
Copy link
Member

Oh! Thanks! That's indeed some false-positive.

Could you confirm that in your setup you don't have any test in the same class?

@avivanoff
Copy link
Author

No. This is our actual code with implementation of Initilize method stripped out.

@avivanoff
Copy link
Author

@Evangelink, any ETA on 3.2.1?

@Evangelink
Copy link
Member

@avivanoff we just released 3.2.1!

@avivanoff
Copy link
Author

Verified, the issue is fixed. Thank you.

@Evangelink
Copy link
Member

Awesome! Looking forward for your feedback on V3.3

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

Successfully merging a pull request may close this issue.

2 participants