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

Switch DataTestMethod to TestMethod #849

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Jan 1, 2025

DataTestMethodAttribute is functionally the same as TestMethodAttribute and they are interchangeable. Using DataTestMethodAttribute is no longer recommended and may be dropped in MSTest v4.

@Youssef1313 Youssef1313 requested a review from a team as a code owner January 1, 2025 08:55
@codecov-commenter
Copy link

codecov-commenter commented Jan 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.47%. Comparing base (9ef64aa) to head (acc244f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #849   +/-   ##
=======================================
  Coverage   46.47%   46.47%           
=======================================
  Files         355      355           
  Lines       14151    14151           
  Branches     1163     1163           
=======================================
  Hits         6577     6577           
  Misses       7026     7026           
  Partials      548      548           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -100,7 +100,6 @@ public void MissingPropertiesTest_ThrowsSHA256()
Assert.ThrowsException<ParserException>(() => result.Files.Select(f => f.ToSbomFile()).ToList());
}

[DataTestMethod]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, can you please put the [TestMethod] attribute before the DataRow attributes for the tests in this file?

@@ -40,7 +40,6 @@ public void StreamEmptyTestReturnsNull()
var result = this.Parse(parser);
}

[DataTestMethod]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, can you please put the [TestMethod] attribute before the DataRow attributes for the tests in this file?

Copy link
Contributor

@DaveTryon DaveTryon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, @Youssef1313! I've requested a minor change just to follow consistent formatting in the test layout

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

Successfully merging this pull request may close these issues.

3 participants