-
Notifications
You must be signed in to change notification settings - Fork 1k
Add unit test for WebBrowserUriTypeConverter.cs file #13523
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 WebBrowserUriTypeConverter.cs file #13523
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13523 +/- ##
====================================================
+ Coverage 62.21083% 76.64147% +14.43063%
====================================================
Files 3213 3231 +18
Lines 638302 639167 +865
Branches 47201 47295 +94
====================================================
+ Hits 397093 489867 +92774
+ Misses 234153 145720 -88433
+ Partials 7056 3580 -3476
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
src/test/unit/System.Windows.Forms/System/Windows/Forms/WebBrowserUriTypeConverterTests.cs
Outdated
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.
Pull Request Overview
This pull request adds a new unit test file for the WebBrowserUriTypeConverter to enhance test coverage for converting different URI inputs. The key changes include tests for valid URI conversion, handling of empty strings, exception throwing on invalid URIs, and returning the same URI when already provided as a Uri.
Comments suppressed due to low confidence (1)
src/test/unit/System.Windows.Forms/System/Windows/Forms/WebBrowserUriTypeConverterTests.cs:43
- [nitpick] Consider adding a test case for null input to verify that WebBrowserUriTypeConverter handles it appropriately.
Uri uri = new("http://www.microsoft.com/");
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, all LGTM!
src/test/unit/System.Windows.Forms/System/Windows/Forms/WebBrowserUriTypeConverterTests.cs
Outdated
Show resolved
Hide resolved
src/test/unit/System.Windows.Forms/System/Windows/Forms/WebBrowserUriTypeConverterTests.cs
Outdated
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