-
Notifications
You must be signed in to change notification settings - Fork 986
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 unit tests for ToolStripActionList #12525
base: main
Are you sure you want to change the base?
Add unit tests for ToolStripActionList #12525
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12525 +/- ##
===================================================
+ Coverage 75.74163% 75.75632% +0.01469%
===================================================
Files 3157 3158 +1
Lines 636098 636207 +109
Branches 47003 47005 +2
===================================================
+ Hits 481791 481967 +176
+ Misses 150846 150777 -69
- Partials 3461 3463 +2
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.
Other than small comment, LGTM
...Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/ToolStripActionListTests.cs
Outdated
Show resolved
Hide resolved
DesignerActionItemCollection items = _actionList.GetSortedActionItems(); | ||
List<DesignerActionItem> itemList = items.Cast<DesignerActionItem>().ToList(); | ||
|
||
itemList.Should().ContainSingle(i => i is DesignerActionMethodItem && ((DesignerActionMethodItem)i).MemberName == "InvokeEmbedVerb"); |
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.
I believe this can be simplified
itemList.Should().ContainSingle(i => i is DesignerActionMethodItem && ((DesignerActionMethodItem)i).MemberName == "InvokeEmbedVerb"); | |
itemList.Should().ContainSingle(i => i is DesignerActionMethodItem action && (action.MemberName == "InvokeEmbedVerb"); |
same can be applied in other places in this change
Related #10773
Proposed changes
Microsoft Reviewers: Open in CodeFlow