-
Notifications
You must be signed in to change notification settings - Fork 1k
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
base: main
Are you sure you want to change the base?
Add code coverage for DataGridVieLinkCell #13524
Conversation
Codecov ReportAttention: Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Show resolved
Hide resolved
There was a problem hiding this 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()
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Outdated
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Outdated
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Outdated
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Outdated
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Outdated
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Show resolved
Hide resolved
There was a problem hiding this 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
src/test/unit/System.Windows.Forms/System/Windows/Forms/DataGridViewLinkCellTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Related #13442
Proposed changes
Add unit test file: DataGridVieLinkCellTests.cs for DataGridVieLinkCell.cs file.