Skip to content

Tests should use theory data#11441

Merged
lonitra merged 15 commits intomainfrom
Tests_should_use_TheoryData
May 30, 2024
Merged

Tests should use theory data#11441
lonitra merged 15 commits intomainfrom
Tests_should_use_TheoryData

Conversation

@LeafShi1
Copy link
Member

@LeafShi1 LeafShi1 commented May 29, 2024

Makes progress to fix #11041
Deal with the feedback of the PR #11171

Proposed changes

  • Changed untyped test data to use typed TheoryData objects.
  • Allowing us to enable xUnit1024 errors in .editorconfig.
  • Currently fixes test cases in Windows form analyzer (CSharp) with one exception
    for the file reader font converter.

Customer Impact

  • No customer impact, just refactoring old test cases.

Regression?

  • No

Risk

-There should be no risk in moving to strongly typed parameterized test methods.

Test methodology

  • Because the tests are functionally identical, I used the tests that were already present.

Test environment(s)

Microsoft Reviewers: Open in CodeFlow

@LeafShi1 LeafShi1 requested a review from a team as a code owner May 29, 2024 06:10
@codecov
Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.33994%. Comparing base (d9e9d93) to head (51edb65).
Report is 165 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #11441         +/-   ##
===================================================
+ Coverage   73.44664%   74.33994%   +0.89329%     
===================================================
  Files           3098        3028         -70     
  Lines         632225      627403       -4822     
  Branches       46653       46770        +117     
===================================================
+ Hits          464348      466411       +2063     
+ Misses        164485      157642       -6843     
+ Partials        3392        3350         -42     
Flag Coverage Δ
Debug 74.33994% <100.00000%> (+0.89329%) ⬆️
integration 17.97822% <ø> (-0.38372%) ⬇️
production 47.11818% <ø> (+0.20665%) ⬆️
test 96.98449% <100.00000%> (+1.99849%) ⬆️
unit 44.10422% <ø> (+0.22661%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@elachlan elachlan added the waiting-review This item is waiting on review by one or more members of team label May 29, 2024
@Tanya-Solyanik Tanya-Solyanik added waiting-author-feedback The team requires more information from the author and removed waiting-review This item is waiting on review by one or more members of team labels May 29, 2024
@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback The team requires more information from the author label May 30, 2024
@elachlan elachlan added the waiting-review This item is waiting on review by one or more members of team label May 30, 2024
Copy link
Member

@lonitra lonitra left a comment

Choose a reason for hiding this comment

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

👍

@lonitra lonitra merged commit c3dd6f4 into main May 30, 2024
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0 Preview6 milestone May 30, 2024
@dotnet-policy-service dotnet-policy-service bot removed the waiting-review This item is waiting on review by one or more members of team label May 30, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2024
@lonitra lonitra deleted the Tests_should_use_TheoryData branch July 30, 2024 18:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests should use TheoryData<>

5 participants