-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add unit test for ToolStripInSituService #13021
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 test for ToolStripInSituService #13021
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13021 +/- ##
===================================================
+ Coverage 75.97321% 76.11337% +0.14016%
===================================================
Files 3265 3276 +11
Lines 643286 643879 +593
Branches 47431 47460 +29
===================================================
+ Hits 488725 490078 +1353
+ Misses 150991 150230 -761
- Partials 3570 3571 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
...dows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/ToolStripInSituServiceTests.cs
Outdated
Show resolved
Hide resolved
...dows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/ToolStripInSituServiceTests.cs
Outdated
Show resolved
Hide resolved
...dows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/ToolStripInSituServiceTests.cs
Show resolved
Hide resolved
...dows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/ToolStripInSituServiceTests.cs
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.
Pull Request Overview
This PR adds a unit test file for ToolStripInSituService to verify the proper behavior of its properties, methods, and disposal logic.
- Introduces unit tests for ensuring proper disposal of designers and unsubscribing from services.
- Verifies service retrieval and proper response to component removal events.
Comments suppressed due to low confidence (2)
src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/ToolStripInSituServiceTests.cs:98
- [nitpick] The test method name 'GetEditWindow_ReturnsZero_WhenNoDesignerIsNotNull' contains a double negative that may be unclear. Consider renaming it to 'GetEditWindow_ReturnsZero_WhenDesignerIsNull' for clarity.
public void GetEditWindow_ReturnsZero_WhenNoDesignerIsNotNull()
src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/ToolStripInSituServiceTests.cs:72
- [nitpick] The test method name 'ToolStripKeyBoardService_ReturnsServiceInstance' uses 'KeyBoard' with an unexpected casing; consider renaming it to 'ToolStripKeyboardService_ReturnsServiceInstance' to match the typical casing in the codebase.
public void ToolStripKeyBoardService_ReturnsServiceInstance()
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.
Except for small comments, all LGTM!
...dows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/ToolStripInSituServiceTests.cs
Show resolved
Hide resolved
...dows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/ToolStripInSituServiceTests.cs
Show resolved
Hide resolved
|
@ricardobossan or @LeafShi1 - could you please pick up this PR? |
* Add coveerage for ToolStripInSituService, completing PR #13021 --------- Co-authored-by: Ricardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box) <[email protected]>
Related #10773
Proposed changes
Microsoft Reviewers: Open in CodeFlow