-
Notifications
You must be signed in to change notification settings - Fork 992
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
Code Coverage for DownloadFile Review 1St #12486
base: main
Are you sure you want to change the base?
Code Coverage for DownloadFile Review 1St #12486
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12486 +/- ##
===================================================
+ Coverage 76.03186% 76.23595% +0.20409%
===================================================
Files 3181 3186 +5
Lines 639670 642403 +2733
Branches 47215 47353 +138
===================================================
+ Hits 486353 489742 +3389
+ Misses 149797 149134 -663
- Partials 3520 3527 +7
Flags with carried forward coverage won't be shown. Click here to find out more. |
Cleanup
Move test constants to separate module for future reuse
Move some constants around Rename some files that are shared between upload and download
src/Microsoft.VisualBasic.Forms/tests/UnitTests/System/Windows/TestUtilities/WebListener.vb
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualBasic.Forms/tests/UnitTests/System/Windows/Forms/UploadFileTests.vb
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualBasic.Forms/tests/UnitTests/System/Windows/Forms/UploadFileTests.vb
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualBasic.Forms/tests/UnitTests/System/Windows/Forms/UploadFileTests.vb
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualBasic.Forms/tests/UnitTests/System/Windows/TestUtilities/WebListener.vb
Show resolved
Hide resolved
|
||
Friend Function ProcessRequests() As HttpListener | ||
' Create a listener and add the prefixes. | ||
Dim listener As New HttpListener() |
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.
Do we really need an HttpListener, can we mock its functionality instead?
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.
@Tanya-Solyanik I have no idea how to use Mock or if it possible to use it, in this PR I am testing against the existing WebClient which is Obsolete and needs to be removed in the next PR. Download is working very well. I just started looking at Upload and exactly mimicking a Web Server is pointing out areas where my implementation needs work on corner cases. My original testing was with a public upload/download server but @KlausLoeffelmann and at least one other person said that was not allowed. The latest version (which has not yet been reviewed) looks at the uploaded data and throws when the what is uploaded does not exactly match WebClient.
The latest code has upload and download fully working and the next PR completely removes WebClient. I move the 2 strings to this PR so they will be used in testing against the strings in WebClient.
…t filename and size (the data is not saved). Wrap and indent long lines corectly.
Fix Upload logic to handle Web error 500
Correct a test
Replace corrupt PR12221
Proposed changes
Customer Impact
Regression?
Risk
-None
Test environment(s)
Microsoft Reviewers: Open in CodeFlow