Skip to content

Adds code coverage to StandardMenuStripVerb #13492

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ricardobossan
Copy link
Member

@ricardobossan ricardobossan commented May 21, 2025

Related #10773

Proposed changes

  • Adds code coverage to StandardMenuStripVerb

Customer Impact

  • None

Regression?

  • No

Risk

  • Minimal

Test methodology

  • Unit tests

Test environment(s)

  • 10.0.100-preview.5.25265.106
Microsoft Reviewers: Open in CodeFlow

Related dotnet#10773

## Proposed changes

- Adds code coverage to `StandardMenuStripVerb`

## Customer Impact

- None

## Regression?

- No

## Risk

- Minimal

## Test methodology

- Unit tests

## Test environment(s)

- 10.0.100-preview.5.25265.106
@ricardobossan ricardobossan self-assigned this May 21, 2025
@ricardobossan ricardobossan requested a review from a team as a code owner May 21, 2025 00:06
@ricardobossan ricardobossan added the waiting-review This item is waiting on review by one or more members of team label May 21, 2025
@LeafShi1 LeafShi1 requested a review from Copilot May 21, 2025 06:16
Copy link
Contributor

@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

Adds unit tests to improve code coverage of StandardMenuStripVerb, verifying its constructor and item insertion behavior.

  • Introduces StandardMenuStripVerbTests with extensive Moq setup for designer host and services.
  • Adds tests for the class constructor and the InsertItems method.
Comments suppressed due to low confidence (1)

src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/StandardMenuStripVerbTests.cs:108

  • [nitpick] Currently only the constructor and InsertItems are verified. Consider adding tests for other behaviors (e.g., error paths, multiple inserts) to fully cover StandardMenuStripVerb.
[WinFormsFact]

Copy link

codecov bot commented May 21, 2025

Codecov Report

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

Project coverage is 76.63742%. Comparing base (4c32f29) to head (d7d18a0).
Report is 4 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13492         +/-   ##
===================================================
+ Coverage   76.59683%   76.63742%   +0.04059%     
===================================================
  Files           3230        3231          +1     
  Lines         639157      639253         +96     
  Branches       47295       47304          +9     
===================================================
+ Hits          489574      489907        +333     
+ Misses        146007      145765        -242     
- Partials        3576        3581          +5     
Flag Coverage Δ
Debug 76.63742% <96.66667%> (+0.04059%) ⬆️
integration 18.78571% <0.00000%> (-0.00437%) ⬇️
production 51.08615% <100.00000%> (+0.08510%) ⬆️
test 97.40390% <96.59091%> (-0.00022%) ⬇️
unit 48.47527% <100.00000%> (+0.07681%) ⬆️

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.

Co-authored-by: Klaus Löffelmann <9663150+KlausLoeffelmann@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-test coverage waiting-review This item is waiting on review by one or more members of team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants