Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add unit tests for ToolStripAdornerWindowService #13029

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

Conversation

Nora-Zhou01
Copy link
Contributor

@Nora-Zhou01 Nora-Zhou01 commented Feb 26, 2025

Related #10773

Proposed changes

  • Add unit test ToolStripAdornerWindowServiceTests.cs for public properties and method of the ToolStripAdornerWindowService
Microsoft Reviewers: Open in CodeFlow

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 95.77465% with 3 lines in your changes missing coverage. Please review.

Project coverage is 61.72171%. Comparing base (e91e3bc) to head (4d9c823).
Report is 509 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                  @@
##                main      #13029          +/-   ##
====================================================
- Coverage   75.75455%   61.72171%   -14.03284%     
====================================================
  Files           3159        1538        -1621     
  Lines         635942      158552      -477390     
  Branches       46987       14760       -32227     
====================================================
- Hits          481755       97861      -383894     
+ Misses        150726       59989       -90737     
+ Partials        3461         702        -2759     
Flag Coverage Δ
Debug 61.72171% <95.77465%> (-14.03284%) ⬇️
integration 10.66152% <ø> (-7.51326%) ⬇️
production 39.63397% <ø> (-9.68358%) ⬇️
test 95.67312% <95.77465%> (-1.37195%) ⬇️
unit 37.06576% <ø> (-9.46595%) ⬇️

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.

Copy link

@Copilot 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.

PR Overview

This pull request adds unit tests for the ToolStripAdornerWindowService to validate its public properties and methods along with enabling nullability in the tests.

  • Introduces multiple tests covering graphics, coordinate translation, and resource disposal.
  • Provides STA-thread execution for tests that interact with UI components.

Reviewed Changes

File Description
src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/ToolStripAdornerWindowServiceTests.cs Contains new unit tests for verifying ToolStripAdornerWindowService behavior and proper handling of designer overlays and graphics.

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@ricardobossan ricardobossan added the waiting-author-feedback The team requires more information from the author label Mar 3, 2025
@Nora-Zhou01 Nora-Zhou01 added waiting-review This item is waiting on review by one or more members of team and removed waiting-author-feedback The team requires more information from the author labels Mar 5, 2025
ricardobossan
ricardobossan previously approved these changes Mar 6, 2025
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.

Thank you!

@Tanya-Solyanik Tanya-Solyanik added 📭 waiting-author-feedback and removed waiting-review This item is waiting on review by one or more members of team labels Mar 7, 2025
@ricardobossan ricardobossan dismissed their stale review March 7, 2025 02:14

New comments need to be addressed

@Nora-Zhou01 Nora-Zhou01 added the waiting-review This item is waiting on review by one or more members of team label Mar 7, 2025
ricardobossan
ricardobossan previously approved these changes Mar 7, 2025
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.

Thank you!

LeafShi1
LeafShi1 previously approved these changes Mar 12, 2025
@Tanya-Solyanik Tanya-Solyanik added waiting-author-feedback The team requires more information from the author and removed waiting-review This item is waiting on review by one or more members of team labels Mar 25, 2025
LeafShi1
LeafShi1 previously approved these changes Mar 28, 2025
@LeafShi1 LeafShi1 added waiting-review This item is waiting on review by one or more members of team and removed waiting-author-feedback The team requires more information from the author labels Mar 28, 2025
Copy link
Member

@Tanya-Solyanik Tanya-Solyanik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, added a minor comment.

@Tanya-Solyanik Tanya-Solyanik added waiting-author-feedback The team requires more information from the author and removed waiting-review This item is waiting on review by one or more members of team labels Mar 31, 2025
@ricardobossan ricardobossan dismissed LeafShi1’s stale review March 31, 2025 23:33

New comments need to be addressed.

@LeafShi1 LeafShi1 added waiting-review This item is waiting on review by one or more members of team and removed waiting-author-feedback The team requires more information from the author labels Apr 3, 2025
Copy link
Member

@Tanya-Solyanik Tanya-Solyanik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Tanya-Solyanik Tanya-Solyanik merged commit 241b1de into dotnet:main Apr 3, 2025
7 of 8 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0 Preview4 milestone Apr 3, 2025
@dotnet-policy-service dotnet-policy-service bot removed the waiting-review This item is waiting on review by one or more members of team label Apr 3, 2025
@github-actions github-actions bot locked and limited conversation to collaborators May 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants