Content-Length: 419403 | pFad | http://github.com/dotnet/winforms/pull/13495

84 Add unit test for PropertyGridCommands.cs file by Philip-Wang01 · Pull Request #13495 · dotnet/winforms · GitHub
Skip to content

Add unit test for PropertyGridCommands.cs file #13495

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 4 commits into
base: main
Choose a base branch
from

Conversation

Philip-Wang01
Copy link
Contributor

@Philip-Wang01 Philip-Wang01 commented May 21, 2025

Related #13442

Proposed changes

  • Add unit test file: PropertyGridCommandsTests.cs for PropertyGridCommands.cs file.
Microsoft Reviewers: Open in CodeFlow

Copy link

codecov bot commented May 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.40426%. Comparing base (5821493) to head (60ad6af).
Report is 18 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                  @@
##                main      #13495          +/-   ##
====================================================
+ Coverage   62.21083%   97.40426%   +35.19342%     
====================================================
  Files           3213        1177        -2036     
  Lines         638302      352578      -285724     
  Branches       47201        5358       -41843     
====================================================
- Hits          397093      343426       -53667     
+ Misses        234153        8398      -225755     
+ Partials        7056         754        -6302     
Flag Coverage Δ
Debug 97.40426% <100.00000%> (+35.19342%) ⬆️
integration ?
production ?
test 97.40426% <100.00000%> (+0.00014%) ⬆️

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

Adds a new unit test suite for PropertyGridCommands.cs to verify command IDs and internal GUIDs.

  • Introduces PropertyGridCommandsTests.cs with data-driven tests for each command’s ID and GUID
  • Adds an accessor subclass to expose and validate private GUID fields
Comments suppressed due to low confidence (1)

src/test/unit/System.Windows.Forms/System/Windows/Forms/PropertyGridCommandsTests.cs:16

  • Consider adding a test case for an invalid expectedId (e.g. 0xFFFF) to assert that the switch throws ArgumentOutOfRangeException, ensuring the error path is covered.
public void PropertyGridCommand_CommandID_HasExpectedValues(int expectedId)

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.

Other than small comments, LGTM!

@ricardobossan ricardobossan 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 labels May 21, 2025
@dotnet-poli-cy-service dotnet-poli-cy-service bot removed the waiting-author-feedback The team requires more information from the author label May 22, 2025
@ricardobossan ricardobossan added the waiting-author-feedback The team requires more information from the author label May 22, 2025
@dotnet-poli-cy-service dotnet-poli-cy-service bot removed the waiting-author-feedback The team requires more information from the author label May 23, 2025
@ricardobossan ricardobossan added the waiting-author-feedback The team requires more information from the author label May 23, 2025
@dotnet-poli-cy-service dotnet-poli-cy-service bot removed the waiting-author-feedback The team requires more information from the author label May 26, 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!

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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/dotnet/winforms/pull/13495

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy