-
Notifications
You must be signed in to change notification settings - Fork 985
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
Add code coverage for buttons #10693
Add code coverage for buttons #10693
Conversation
Drafted because there's more code to add coverage to. |
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ButtonTests.cs
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10693 +/- ##
===================================================
+ Coverage 73.32489% 73.36648% +0.04158%
===================================================
Files 3094 3099 +5
Lines 632406 632804 +398
Branches 46857 46880 +23
===================================================
+ Hits 463711 464266 +555
+ Misses 165250 165079 -171
- Partials 3445 3459 +14
Flags with carried forward coverage won't be shown. Click here to find out more. |
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ButtonTests.cs
Outdated
Show resolved
Hide resolved
70724a7
to
895e1cd
Compare
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.
Great new tests! I added some comments that apply to multiple spots, but I had not repeated them everywhere, please review your changes with these comments in mind.
It will be outside of scope for this PR to move all tests to a new model where test is defined in the base class, but the Fact is implemented in a derived class. But you could implement new tests so that they follow this pattern.
Test naming is clarified here - https://github.com/dotnet/winforms/blob/main/docs/testing.md#unit-test-best-practices
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ButtonBaseTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ButtonBaseTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ButtonTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/CheckBoxRenderingTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/CheckBoxRenderingTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ButtonBaseTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/CheckBoxRenderingTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/RadioButtonRenderingTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/RadioButtonRenderingTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/RadioButtonTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AbstractButtonBaseTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AbstractButtonBaseTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AbstractButtonBaseTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ButtonBaseTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/CheckBoxTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/CheckBoxTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/CheckBoxTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/CheckBoxTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/RadioButtonRendererTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/RadioButtonTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AbstractButtonBaseTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AbstractButtonBaseTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ButtonTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/CheckBoxRendererTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/RadioButtonRendererTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/CheckBoxTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/RadioButtonRendererTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/RadioButtonRendererTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/RadioButtonRendererTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/RadioButtonRendererTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AbstractButtonBaseTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/CheckBoxRendererTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AbstractButtonBaseTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/CheckBoxRendererTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/CheckBoxTests.cs
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/RadioButtonRendererTests.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AbstractButtonBaseTests.cs
Outdated
Show resolved
Hide resolved
617ca4d
to
f45c140
Compare
Please rebase on the latest. |
3c2bb80
to
071c597
Compare
Adds code coverage for buttons in the application, ensuring comprehensive testing of button functionalities. Related dotnet#10453 Squashed all commits from the PR for better clarity and management.
071c597
to
d8c4b59
Compare
related #10453
related #10773
Proposed changes
Add unit tests for FlatButton, RadioButton, CheckBox, RadioButtonRenderer and CheckBoxRenderer.
Customer Impact
Regression?
Risk
Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow