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

Obsolete [DataTestMethod] in favor of [TestMethod] #4166

Open
Evangelink opened this issue Nov 26, 2024 · 4 comments
Open

Obsolete [DataTestMethod] in favor of [TestMethod] #4166

Evangelink opened this issue Nov 26, 2024 · 4 comments
Assignees

Comments

@Evangelink
Copy link
Member

They are fully interchangeable and [DataTestMethod] as no different value so I suggest to mark it as obsolete (let's use a special diagnostic code to make it easy for people).

@nohwnd
Copy link
Member

nohwnd commented Nov 27, 2024

https://github.com/approvals/ApprovalTests.Net/blob/master/src/ApprovalTests/Namers/UnitTestFrameworks/MsTestDataTestMethodStackTraceParser.cs

Looks like there are some more usages of this as well. Are you sure this won't have impact that outweighs the benefits (are there any, other than having one less class?)

https://grep.app/search?q=DataTestMethodAttribute

@Evangelink
Copy link
Member Author

It will definitely cause warnings but the class is fully pointless so I want to get rid of it in v4 meaning we need to give some transitioning time to users.

@nohwnd
Copy link
Member

nohwnd commented Nov 27, 2024

What is our evidence for being fully pointless? I agree code wise that it does nothing for the test framework, but maybe it has semantic meaning for the consumers and they built their tools depending on this meaning.

@SteveSyfuhs
Copy link
Member

Yeah, this is a really annoying change for what appears to be zero value to the consumer. All it's doing is causing churn in test code. Please reconsider how much time and energy you're asking all consumers to invest with this change. It could be as simple as find and replace but it might not be.

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

No branches or pull requests

3 participants