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

MSTEST0029 (Public method should be test method) false positive on public Dispose #4660

Closed
Youssef1313 opened this issue Jan 15, 2025 · 1 comment · Fixed by #4803
Closed

Comments

@Youssef1313
Copy link
Member

Youssef1313 commented Jan 15, 2025

Having a TestClass that implements IDisposable and implement Dispose method implicitly will trigger MSTEST0029

	[TestClass]
	public class TestClass1 : IDisposable
	{
		[TestMethod]
		public void TestMethod1()
		{
		}

		public void Dispose() { }
	}
@Evangelink
Copy link
Member

We should probably not report on any interface implementation.

Afaik people don't have test methods as part of interfaces so this should provide the best experience.

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