-
Notifications
You must be signed in to change notification settings - Fork 70
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
Adds an analyzer for suggesting tests move to the strongly-typed TheoryData classes (xunit/xunit#1244) #171
Conversation
There are a couple things I want to change with this PR, which I'm going to do myself (so nothing required on your side).
As for apologizing for missing edge cases...it's super easy to miss edge cases here, and I miss them all the time. 😄 I do have the advantage of having filed away 16 years of xUnit.net history in my head so that it might make it easier for me to recognize some of those edge cases (this is especially the case for v3-related stuff, since as near as I can tell, I'm the only person who's ever used v3 in any way 😂). Believe me, even submitting PRs with a few missed edge cases is super helpful and appreciated. |
Thanks! |
Much gratitude to you, @bradwilson . Thanks. |
It appears that one of my previous checkins had some needed follow-on by the project organizer. My sincere apologies for the inconvenience. I've taken some effort in this PR to look for more edge cases when possible.
This PR is a proposed resolution to issue xunit/xunit#1244. It adds an analyzer to suggest someone who is not using TheoryData to do so for the benefit of strong typing.
In working through scenarios, it occurred to me that someone may have subclassed TheoryData. Therefore, I updated the logic to allow for subclassing and still detect properly. Test cases have been added to demonstrate such.
@bradwilson I hope this PR is better than the last one for quality.