Skip to content

Add code coverage for DesignerUtils #13341

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

Merged

Conversation

Zheng-Li01
Copy link
Member

@Zheng-Li01 Zheng-Li01 commented Apr 22, 2025

Related #10773

Proposed changes

Add unit test file: DesignerUtilsTests.cs for public methods & properties of the DesignerUtils.cs

Note: working on another PR for the remaining test case

Microsoft Reviewers: Open in CodeFlow

Copy link

codecov bot commented Apr 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.62927%. Comparing base (99b335c) to head (45a7b9c).
Report is 14 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                  @@
##                main      #13341          +/-   ##
====================================================
- Coverage   95.68899%   62.62927%   -33.05973%     
====================================================
  Files            542        1561        +1019     
  Lines          63419      159839       +96420     
  Branches        1451       14915       +13464     
====================================================
+ Hits           60685      100106       +39421     
- Misses          2400       58958       +56558     
- Partials         334         775         +441     
Flag Coverage Δ
Debug 62.62927% <100.00000%> (-33.05973%) ⬇️
integration 11.32692% <ø> (?)
production 40.81120% <ø> (?)
test 95.69857% <100.00000%> (+0.00957%) ⬆️
unit 38.21001% <ø> (?)

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.

Pull Request Overview

This PR adds unit tests to verify the public methods and properties of DesignerUtils as part of enhancing code coverage related to issue #10773.

  • Added a new test file (DesignerUtilsTests.cs) containing tests for BoxImage, HoverBrush, MinDragSize, and drawing methods.
  • Introduced theory tests to validate behavior of the DrawResizeBorder method based on different background colors.

@ricardobossan ricardobossan added the waiting-review This item is waiting on review by one or more members of team label Apr 23, 2025
Copy link
Contributor

@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!

@ricardobossan ricardobossan merged commit 1922204 into dotnet:main Apr 24, 2025
8 checks passed
@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 24, 2025
@Zheng-Li01 Zheng-Li01 deleted the Add_code_coverage_for_DesignerUtils branch April 25, 2025 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants