Skip to content

Conversation

@John-Qiao
Copy link
Contributor

@John-Qiao John-Qiao commented Feb 25, 2025

Related #10773

Proposed changes

  • Add unit test ToolStripInSituServiceTests.cs for properties and methods of the ToolStripInSituService.
Microsoft Reviewers: Open in CodeFlow

@John-Qiao John-Qiao requested a review from a team as a code owner February 25, 2025 08:20
@codecov
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.11337%. Comparing base (8ef1b9c) to head (c07d104).
Report is 268 commits behind head on main.

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     
Flag Coverage Δ
Debug 50.14895% <100.00000%> (-22.30331%) ⬇️
integration 18.04023% <ø> (+0.02806%) ⬆️
production 50.14895% <ø> (+0.28327%) ⬆️
test ∅ <100.00000%> (∅)
unit 47.58260% <ø> (+0.25759%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@John-Qiao John-Qiao added the waiting-review This item is waiting on review by one or more members of team label Feb 25, 2025
@Tanya-Solyanik Tanya-Solyanik removed the waiting-review This item is waiting on review by one or more members of team label Feb 26, 2025
@Tanya-Solyanik Tanya-Solyanik added waiting-author-feedback The team requires more information from the author waiting-review This item is waiting on review by one or more members of team and removed waiting-review This item is waiting on review by one or more members of team waiting-author-feedback The team requires more information from the author labels Feb 27, 2025
@LeafShi1 LeafShi1 removed the waiting-review This item is waiting on review by one or more members of team label Mar 11, 2025
@Olina-Zhang Olina-Zhang added the waiting-author-feedback The team requires more information from the author label Mar 19, 2025
@ricardobossan ricardobossan requested a review from Copilot March 26, 2025 23:01
Copy link
Contributor

Copilot AI left a 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()

Copy link
Member

@ricardobossan ricardobossan left a 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!

@Tanya-Solyanik
Copy link
Contributor

@ricardobossan or @LeafShi1 - could you please pick up this PR?

@ricardobossan ricardobossan self-assigned this Apr 4, 2025
ricardobossan pushed a commit to ricardobossan/winforms that referenced this pull request Apr 7, 2025
Tanya-Solyanik pushed a commit that referenced this pull request Apr 16, 2025
* Add coveerage for ToolStripInSituService, completing PR #13021

---------

Co-authored-by: Ricardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box) <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

waiting-author-feedback The team requires more information from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants