-
Notifications
You must be signed in to change notification settings - Fork 262
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
TestContext (MSTEST0005) is enforced to be case-sensitive #4428
Comments
@stan-sz Thanks for reporting this. Putting the analyzer behavior aside, is the I think the current analyzer behavior is correct and TestContext was probably never set when the name is If you confirm that TestContext isn't set when it's named |
Just did a quick test and looks like this is a doc issue. @Youssef1313 please try to confirm with 3.2 or 3.3. |
@Evangelink I confirmed that 3.3 has the same behavior where the name must be exactly TestContext. I opened a PR to increase our test coverage for this case, and opened a docs PR to fix the misleading information as well. Thanks again @stan-sz for bringing this to our attention. |
I'm closing as the docs PR is merged, as well as the test coverage PR. @stan-sz Feel free to re-open and let us know if there are more issues on this topic. Thanks again for bringing it to our attention! |
Describe the bug
With 3.7 release, the TestContext (MSTEST0005) is enforced to be case-sensitive. According to the docs, https://learn.microsoft.com/en-us/dotnet/core/testing/mstest-analyzers/mstest0005, it is meant to be case insensitive).
Steps To Reproduce
Create a test class with
Expected behavior
No MSTEST0005
Actual behavior
MSTEST0005 is raised
The text was updated successfully, but these errors were encountered: