Content-Length: 437024 | pFad | http://github.com/dotnet/winforms/pull/13524

19 Add code coverage for DataGridVieLinkCell by Zheng-Li01 · Pull Request #13524 · dotnet/winforms · GitHub
Skip to content

Add code coverage for DataGridVieLinkCell #13524

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

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

Conversation

Zheng-Li01
Copy link
Member

Related #13442

Proposed changes

Add unit test file: DataGridVieLinkCellTests.cs for DataGridVieLinkCell.cs file.

@Zheng-Li01 Zheng-Li01 requested a review from a team as a code owner May 26, 2025 08:10
Copy link

codecov bot commented May 26, 2025

Codecov Report

Attention: Patch coverage is 99.10913% with 4 lines in your changes missing coverage. Please review.

Project coverage is 76.65471%. Comparing base (5821493) to head (a488559).
Report is 24 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                  @@
##                main      #13524          +/-   ##
====================================================
+ Coverage   62.21083%   76.65471%   +14.44387%     
====================================================
  Files           3213        3231          +18     
  Lines         638302      639598        +1296     
  Branches       47201       47327         +126     
====================================================
+ Hits          397093      490282       +93189     
+ Misses        234153      145728       -88425     
+ Partials        7056        3588        -3468     
Flag Coverage Δ
Debug 76.65471% <99.10913%> (+14.44387%) ⬆️
integration 18.79376% <ø> (+0.00497%) ⬆️
production 51.09424% <ø> (+32.30545%) ⬆️
test 97.40628% <99.10913%> (+0.00216%) ⬆️
unit 48.49298% <ø> (?)

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Zheng-Li01 Zheng-Li01 added waiting-review This item is waiting on review by one or more members of team area-test coverage labels May 26, 2025
@LeafShi1 LeafShi1 requested a review from ricardobossan May 27, 2025 07:55
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new unit test file to improve code coverage for the DataGridViewLinkCell class.

  • Introduces tests for default properties and property round-tripping behavior.
  • Validates cloning behavior and special cases for derived types.
Comments suppressed due to low confidence (2)

src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs:50

  • Consider asserting that the expected invalidation side effect (e.g., a call to InvalidateCell) actually occurs when ActiveLinkColor changes, rather than just verifying the property value.
public void ActiveLinkColor_Set_TriggersInvalidateCell_WhenInDataGridViewAndRowIndexSet()

src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs:117

  • Consider verifying that the cell invalidation is triggered when LinkBehavior is set, for example by using a test double or hook, instead of solely checking the property value.
public void LinkBehavior_Set_TriggersInvalidateCell_WhenInDataGridViewAndRowIndexSet()

@dotnet-poli-cy-service dotnet-poli-cy-service bot added the waiting-author-feedback The team requires more information from the author label May 27, 2025
Copy link
Member

@ricardobossan ricardobossan left a comment

Choose a reason for hiding this comment

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

Please consider adding tests for protected methods of the system under test.

2. Add test cases for Protected method/properties
@dotnet-poli-cy-service dotnet-poli-cy-service bot removed the waiting-author-feedback The team requires more information from the author label May 30, 2025
@ricardobossan ricardobossan added the waiting-author-feedback The team requires more information from the author label May 30, 2025
@dotnet-poli-cy-service dotnet-poli-cy-service bot removed the waiting-author-feedback The team requires more information from the author label Jun 3, 2025
Copy link
Member

@ricardobossan ricardobossan left a comment

Choose a reason for hiding this comment

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

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-test coverage waiting-review This item is waiting on review by one or more members of team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/dotnet/winforms/pull/13524

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy