-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add coverage for DataSourceListEditor #13122
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 coverage for DataSourceListEditor #13122
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13122 +/- ##
===================================================
+ Coverage 61.32538% 61.54578% +0.22039%
===================================================
Files 1543 1549 +6
Lines 158339 158612 +273
Branches 14745 14758 +13
===================================================
+ Hits 97102 97619 +517
+ Misses 60539 60291 -248
- Partials 698 702 +4
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Expected type to be System.NotSupportedException, but found System.IO.MemoryStream. |
...indows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/DataSourceListEditorTests.cs
Outdated
Show resolved
Hide resolved
Epica3055
left a comment
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.
looks good 👍
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 unit tests for the DataSourceListEditor to improve coverage for its public methods.
- Introduces tests for checking the resizable drop-down property.
- Verifies EditValue behavior under various parameter scenarios.
- Confirms that GetEditStyle returns the expected UI type.
Comments suppressed due to low confidence (1)
src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/DataSourceListEditorTests.cs:33
- [nitpick] Consider also asserting the returned value from EditValue when valid inputs are provided, if the expected behavior can be predicted beyond ensuring no exception is thrown.
_dataSourceListEditor.EditValue(context: contextMock.Object, provider: providerMock.Object, value: null);
ricardobossan
left a comment
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.
Other than a small comment, all LGTM!
...indows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/DataSourceListEditorTests.cs
Outdated
Show resolved
Hide resolved
ricardobossan
left a comment
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!
...indows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/DataSourceListEditorTests.cs
Outdated
Show resolved
Hide resolved
…/Forms/Design/DataSourceListEditorTests.cs
...indows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/DataSourceListEditorTests.cs
Outdated
Show resolved
Hide resolved
…/Forms/Design/DataSourceListEditorTests.cs
Tanya-Solyanik
left a comment
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 #10773
Proposed changes
Add unit test DataSourceListEditorTests.cs for public method of the DataSourceListEditor.
Microsoft Reviewers: Open in CodeFlow