-
Notifications
You must be signed in to change notification settings - Fork 1k
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
base: main
Are you sure you want to change the base?
Add unit test for PropertyGridCommands.cs file #13495
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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 throwsArgumentOutOfRangeException
, ensuring the error path is covered.
public void PropertyGridCommand_CommandID_HasExpectedValues(int expectedId)
There was a problem hiding this 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!
src/test/unit/System.Windows.Forms/System/Windows/Forms/PropertyGridCommandsTests.cs
Outdated
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/PropertyGridCommandsTests.cs
Outdated
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/PropertyGridCommandsTests.cs
Outdated
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/PropertyGridCommandsTests.cs
Outdated
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/PropertyGridCommandsTests.cs
Outdated
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/PropertyGridCommandsTests.cs
Outdated
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/PropertyGridCommandsTests.cs
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/PropertyGridCommandsTests.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Related #13442
Proposed changes
Microsoft Reviewers: Open in CodeFlow