-
Notifications
You must be signed in to change notification settings - Fork 985
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 FlowPanelDesigner #11735
Add unit tests for FlowPanelDesigner #11735
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/10.0 #11735 +/- ##
======================================================
+ Coverage 74.73321% 74.97894% +0.24572%
======================================================
Files 3045 3029 -16
Lines 630638 630229 -409
Branches 46862 46740 -122
======================================================
+ Hits 471296 472539 +1243
+ Misses 155980 154344 -1636
+ Partials 3362 3346 -16
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
||
public sealed class FlowPanelDesignerTests | ||
{ | ||
private (Panel panel, FlowPanelDesigner designer) SetupDesignerWithPanel() |
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.
panel
never seems to be used in the tests. Let's remove returning it
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.
designer.Initialize(panel)
: the panel is passed to the Initialize method of FlowPanelDesigner. This step associates the FlowPanelDesigner with the Panel, allowing the designer to perform operations on the Panel.
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.
Yes, designer.Initialize(panel)
is still necessary, but we do not need to return panel
from this method since it is not used outside of this method. Signature for this method could just be :
private FlowPanelDesigner SetupDesignerWithPanel()
...m.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/FlowPanelDesignerTests.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
Microsoft Reviewers: Open in CodeFlow