-
Notifications
You must be signed in to change notification settings - Fork 1k
Add code coverage for ListBoxSelectedObjectCollection #12952
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 ListBoxSelectedObjectCollection #12952
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12952 +/- ##
===================================================
- Coverage 76.08036% 75.99080% -0.08957%
===================================================
Files 3255 3265 +10
Lines 642192 643391 +1199
Branches 47295 47433 +138
===================================================
+ Hits 488582 488918 +336
- Misses 150056 150911 +855
- Partials 3554 3562 +8
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
....Windows.Forms/tests/UnitTests/System/Windows/Forms/ListBox.SelectedObjectCollectionTests.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms/tests/UnitTests/System/Windows/Forms/ListBox.SelectedObjectCollectionTests.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms/tests/UnitTests/System/Windows/Forms/ListBox.SelectedObjectCollectionTests.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.
Other than small comments, LGTM!
....Windows.Forms/tests/UnitTests/System/Windows/Forms/ListBox.SelectedObjectCollectionTests.cs
Show resolved
Hide resolved
public void ListBoxSelectedObjectCollection_Ctor_ListBox() => | ||
Assert.True(_collection.IsReadOnly); |
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.
When breaking an expression-bodied method into multiple lines, please place the arrow operator on the line below, directly before the method body.
This happens in other methods as well.
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.
@ricardobossan @Zheng-Li01 - Actually the style guide is the other way around - https://github.com/dotnet/winforms/blob/main/docs/coding-style.md#line-breaks
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.
Thanks for the clarification, @Tanya-Solyanik! I had read the style guide before but got the formatting mixed up. I’ll make sure to follow the right approach going forward.
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!
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 #10453
Proposed changes
Add unit tests for ListBox.SelectedObjectCollection.cs to test its methods
Microsoft Reviewers: Open in CodeFlow