Skip to content
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

Open
wants to merge 52 commits into
base: main
Choose a base branch
from

Conversation

paul1956
Copy link
Contributor

@paul1956 paul1956 commented Nov 14, 2024

Replace corrupt PR12221

Proposed changes

  • Code Coverage for DownloadFile

Customer Impact

  • This adds code coverage for DownloadFile which will be required to replace obsolete WebClient.

Regression?

  • No

Risk

-None

Test environment(s)

Microsoft Reviewers: Open in CodeFlow

@paul1956 paul1956 requested a review from a team as a code owner November 14, 2024 19:22
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 97.87911% with 60 lines in your changes missing coverage. Please review.

Project coverage is 76.23595%. Comparing base (084e6d0) to head (ad1bab1).

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     
Flag Coverage Δ
Debug 76.23595% <97.87911%> (+0.20409%) ⬆️
integration 18.17051% <0.00000%> (-0.00577%) ⬇️
production 50.07310% <92.13483%> (+0.25111%) ⬆️
test 97.03720% <98.06569%> (+0.00804%) ⬆️
unit 47.30751% <92.13483%> (+0.26460%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.


Friend Function ProcessRequests() As HttpListener
' Create a listener and add the prefixes.
Dim listener As New HttpListener()
Copy link
Member

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?

Copy link
Contributor Author

@paul1956 paul1956 Dec 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants