-
Notifications
You must be signed in to change notification settings - Fork 1k
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
base: main
Are you sure you want to change the base?
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.45499% +0.12960%
===================================================
Files 1543 1548 +5
Lines 158339 158503 +164
Branches 14745 14751 +6
===================================================
+ Hits 97102 97408 +306
+ Misses 60539 60391 -148
- Partials 698 704 +6
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
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);
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
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