-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add code coverage for DataGridViewColumnTypeEditor #13084
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
Add code coverage for DataGridViewColumnTypeEditor #13084
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13084 +/- ##
===================================================
+ Coverage 61.02797% 61.31589% +0.28791%
===================================================
Files 1539 1542 +3
Lines 158039 158326 +287
Branches 14721 14744 +23
===================================================
+ Hits 96448 97079 +631
+ Misses 60897 60549 -348
- Partials 694 698 +4
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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.
PR Overview
This PR adds a new unit test file to validate the public methods of DataGridViewColumnTypeEditor.
- Added tests to verify proper initialization and default property values.
- Included tests for GetEditStyle returning the expected UITypeEditorEditStyle.
- Covered scenarios in EditValue where essential services or context instances are missing.
Reviewed Changes
| File | Description |
|---|---|
| src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/DataGridViewColumnTypeEditorTests.cs | New test file verifying initialization, GetEditStyle, and EditValue behaviors |
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/DataGridViewColumnTypeEditorTests.cs:40
- Consider adding a test case for the scenario where both a non-null IWindowsFormsEditorService and a valid context instance are provided, verifying any additional behavior of EditValue beyond simply returning the original value.
Mock<IServiceProvider> serviceProviderMock = new();
Related #10773
Proposed changes
Add unit test file: DataGridViewColumnTypeEditor.cs for public methods of the DataGridViewColumnTypeEditor.cs
Microsoft Reviewers: Open in CodeFlow