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 101 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
1cd54bf
Add NetwrokDownloadTests and WebListner
paul1956 Nov 14, 2024
bf912fe
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Nov 15, 2024
1adf2be
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Nov 19, 2024
af840f2
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Nov 19, 2024
8f280c4
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Nov 21, 2024
d1b4234
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Nov 22, 2024
4e48605
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Nov 23, 2024
1782915
Rename NetworkTests to DownloadTests
paul1956 Nov 24, 2024
10c1989
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Nov 25, 2024
2d92096
Simplify dialog cancel
paul1956 Nov 26, 2024
4324b8b
Improve test coverage for Null or Empty network address
paul1956 Nov 26, 2024
ebdc88d
Dispose of HttpListener
paul1956 Nov 27, 2024
2718370
Fix formating
paul1956 Nov 28, 2024
175440a
Clean up formatting issues
paul1956 Nov 28, 2024
f1c6e65
Move download verifiers to separate file
paul1956 Nov 28, 2024
fa37a7b
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Nov 28, 2024
fbd2c7c
Remove Imports Microsoft.VisualBasic.CompilerServices
paul1956 Nov 28, 2024
0baeb02
Fix error cause myy removal of Imports Microsoft.VisualBasic.Compiler…
paul1956 Nov 28, 2024
8977f10
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Dec 6, 2024
7f51bcc
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Dec 11, 2024
a9eb2f5
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Dec 12, 2024
5b89c04
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Dec 13, 2024
2b7303c
Fix behaviour cancel dialog behavior to match WebCleintDownload
paul1956 Dec 15, 2024
ffe7e35
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Dec 15, 2024
db6bdf6
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Dec 17, 2024
ccdf42b
Add UploadFile Tests
paul1956 Dec 17, 2024
7324bb1
Sort private variables
paul1956 Dec 17, 2024
65cbc86
Move WebListener.vb to TestUtilities Folder
paul1956 Dec 17, 2024
f3cc2d0
Formatting fixes
paul1956 Dec 17, 2024
cdab3aa
Fix formatting
paul1956 Dec 17, 2024
47f12cd
Correct messaages for ProgressDialog which calls wrong GetResourceStr…
paul1956 Dec 19, 2024
e3ce2e2
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Dec 19, 2024
6a82523
Add more tests and check that files are properly uploaded with correc…
paul1956 Dec 19, 2024
2110608
Add char specifier to Inline single character strings
paul1956 Dec 19, 2024
a3ead0c
Fix some missing spaces
paul1956 Dec 19, 2024
41f8a19
Use PathSeparatorTestData
paul1956 Dec 20, 2024
73aa2cd
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Dec 20, 2024
eb6ba5c
Fix order of functions
paul1956 Dec 20, 2024
a7b20cc
Minor formatting changes
paul1956 Dec 20, 2024
c633809
Update cooment for Cllipboard to restore changes lost in merge
paul1956 Dec 20, 2024
4f9d051
Cleanup NetworkUploadFile and consolidate is interactive
paul1956 Dec 20, 2024
354ccdf
Improve UploadFile and DownloadFile Tests
paul1956 Dec 20, 2024
468e669
Add SR strings from WebClient
paul1956 Dec 20, 2024
6e313e2
Fix error handling and add new strings for to replace WebClient
paul1956 Dec 20, 2024
b8de54b
Fix error handling
paul1956 Dec 20, 2024
70283e4
Improve WebListener
paul1956 Dec 22, 2024
0fa9cd3
Fix logic in WebListener return 500 for server errors
paul1956 Dec 22, 2024
a6413df
Sort new functions
paul1956 Dec 22, 2024
8449f48
Improve test server and test
paul1956 Dec 23, 2024
6e3b58e
Improve a couple of Skip comments
paul1956 Dec 23, 2024
d3e5523
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Dec 23, 2024
ad1bab1
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Dec 25, 2024
c67f9cf
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Jan 2, 2025
758772a
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Jan 6, 2025
ac82c9f
PR feedback
paul1956 Jan 8, 2025
e2ff073
PR Feedback Cleanup files in Separate PR
paul1956 Jan 8, 2025
5f956f4
Merge branch 'Cleanup-review-first' into Code-Coverage-DownloadFile-R…
paul1956 Jan 8, 2025
0b70c5d
Merge branch 'master' into Cleanup-review-first
paul1956 Jan 8, 2025
6f59c93
Merge branch 'Cleanup-review-first' into Code-Coverage-DownloadFile-R…
paul1956 Jan 8, 2025
a36b059
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Jan 9, 2025
6509c30
Fix merge error
paul1956 Jan 9, 2025
395de61
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Jan 10, 2025
bf4d70a
PR Feedback Don't create new exceptions.
paul1956 Jan 11, 2025
dced84d
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Jan 11, 2025
b7ad7ae
Sort Unauthorized Access tests together
paul1956 Jan 12, 2025
253b185
Make it easier to test with real web server instead of WebListener
paul1956 Jan 12, 2025
127c7ef
Make FileName for Transfer match size
paul1956 Jan 13, 2025
fde921e
Fix logic for ServerThrowsPasswordErrors
paul1956 Jan 13, 2025
3ed66c3
Add ServerConfiguratio,json file to allow manual testing using privat…
paul1956 Jan 13, 2025
c94a16f
Fix issues found in testing on File servers
paul1956 Jan 14, 2025
b674593
Fix upload and download tests to handle both possible cancelations ex…
paul1956 Jan 14, 2025
e8b912e
Correct skip download test on GitHub
paul1956 Jan 14, 2025
846ae50
Improve code coverage
paul1956 Jan 15, 2025
abeb4f7
Fix spelling error
paul1956 Jan 15, 2025
bb1b65a
Fix default values in ServerConfiguration.json
paul1956 Jan 15, 2025
96e7834
Correct default password for local testing
paul1956 Jan 15, 2025
9faf31e
Make CreateTempFile more robust by making size a FileSize Enum
paul1956 Jan 15, 2025
0efa368
Prevent merge issue
paul1956 Jan 16, 2025
efa5e04
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Jan 16, 2025
bbd01fe
Cleanup VbFileCleanupTestBase
paul1956 Jan 16, 2025
74bb4b8
Change Getter in ServerConfiguration to be private to avoid exposing …
paul1956 Jan 18, 2025
8d46198
Add tests for ServerConfiguration
paul1956 Jan 22, 2025
3eb681c
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Jan 22, 2025
caaeb54
Cleanup ServerConfigurationTests
paul1956 Jan 23, 2025
b9fcf21
Update broken test
paul1956 Jan 23, 2025
0be8d2e
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Jan 24, 2025
79c12e5
Restore WebClientCopy, remove incorrect fix
paul1956 Jan 24, 2025
12364c0
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Jan 25, 2025
db6e9a5
Fix error message text for file upload/download operations
paul1956 Jan 25, 2025
8a51d7e
Improve code coverage
paul1956 Jan 27, 2025
11df186
Improve coverage for invalid connectionTimeout
paul1956 Jan 27, 2025
69f2695
Rename filing tests to end with Throw
paul1956 Jan 27, 2025
cdcb4e7
Improve code coverage
paul1956 Jan 27, 2025
a0b06af
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Jan 27, 2025
1c1341b
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Jan 27, 2025
1d94bd5
Undo changes to WebClientCopy
paul1956 Jan 27, 2025
6a44666
Update changes to SingleInstanceHe;perTests to match master
paul1956 Jan 27, 2025
4674ca3
Fix a couple of comments
paul1956 Jan 27, 2025
16a9c62
Add test for missing file to be downloaded on server
paul1956 Jan 29, 2025
25972f9
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Jan 29, 2025
d5a4723
Merge branch 'master' into Code-Coverage-DownloadFile-Review-1St
paul1956 Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Namespace Microsoft.VisualBasic.Devices
showUI As Boolean) As ProgressDialog

If InteractiveEnvironment(showUI) Then
'Construct the local file. This will validate the full name and path
' Construct the local file. This will validate the full name and path
Dim fullFilename As String = FileSystemUtils.NormalizeFilePath(
path:=destinationFileName,
paramName:=NameOf(destinationFileName))
Expand All @@ -95,7 +95,7 @@ Namespace Microsoft.VisualBasic.Devices
Try
Return New Uri(address)
Catch ex As UriFormatException
'Throw an exception with an error message more appropriate to our API
' Throw an exception with an error message more appropriate to our API
Throw GetArgumentExceptionWithArgName(
argumentName:=NameOf(address),
resourceKey:=SR.Network_InvalidUriString,
Expand Down
66 changes: 38 additions & 28 deletions src/Microsoft.VisualBasic.Forms/src/Resources/SR.resx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<root>
<!--
Microsoft ResX Schema

<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema

Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes

The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.

Example:

... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
Expand All @@ -25,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple

There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the

Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not

The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can

Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.

mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
Expand Down Expand Up @@ -221,4 +222,13 @@
<data name="EnvVarNotFound_Name" xml:space="preserve">
<value>Environment variable is not defined: '{0}'.</value>
</data>
<data name="net_webstatus_NotFound" xml:space="preserve">
<value>The remote server returned an error: (404) Not Found.</value>
</data>
<data name="net_webstatus_Timeout" xml:space="preserve">
<value>The operation has timed out.</value>
</data>
<data name="net_webstatus_Unauthorized" xml:space="preserve">
<value>The remote server returned an error: (401) Unauthorized.</value>
</data>
</root>
15 changes: 15 additions & 0 deletions src/Microsoft.VisualBasic.Forms/src/Resources/xlf/SR.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Microsoft.VisualBasic.Forms/src/Resources/xlf/SR.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Microsoft.VisualBasic.Forms/src/Resources/xlf/SR.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Microsoft.VisualBasic.Forms/src/Resources/xlf/SR.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Microsoft.VisualBasic.Forms/src/Resources/xlf/SR.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Microsoft.VisualBasic.Forms/src/Resources/xlf/SR.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Microsoft.VisualBasic.Forms/src/Resources/xlf/SR.ko.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Microsoft.VisualBasic.Forms/src/Resources/xlf/SR.pl.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Microsoft.VisualBasic.Forms/src/Resources/xlf/SR.pt-BR.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Microsoft.VisualBasic.Forms/src/Resources/xlf/SR.ru.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Microsoft.VisualBasic.Forms/src/Resources/xlf/SR.tr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading