-
Notifications
You must be signed in to change notification settings - Fork 1k
Add test coverage for MaskedTextBox #10978
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 test coverage for MaskedTextBox #10978
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10978 +/- ##
===================================================
+ Coverage 73.17333% 73.20584% +0.03250%
===================================================
Files 3097 3097
Lines 633955 634448 +493
Branches 47364 47380 +16
===================================================
+ Hits 463886 464453 +567
+ Misses 166522 166448 -74
Partials 3547 3547
Flags with carried forward coverage won't be shown. Click here to find out more. |
@LeafShi1, @SimonZhao888 , @Epica3055 , @ricardobossan - please review this PR |
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.
Maybe add tests for default values, to prevent unwanted changes in behavior. Like:
[WinFormsFact]
public void MaskedTextBox_DefaultValues()
{
var control = new MaskedTextBox();
Assert.False(control.AcceptsTab);
Assert.True(control.AllowPromptAsInput);
Assert.False(control.AsciiOnly);
Assert.False(control.BeepOnError);
Assert.False(control.CanUndo);
}
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.
We are moving towards adopting Fluent Assertions for tests. Take inspiration from these recent commits:
For a detailed guide, refer to the Fluent Assertions documentation here.
LGTM |
Related #10453
Proposed changes
Customer Impact
Regression?
Risk
Test methodology
Microsoft Reviewers: Open in CodeFlow