-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce static field for the PropertyFormat to improve readability,…
… add a test case (#251) * Introduce static field with allowed HttpUrl schemas * Rename HttpUrl PropertyFormat tests * Move the using statements down to ensure consistency * Add a non-HTTP URL test case for HttpUrl PropertyFormat
- Loading branch information
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,7 +162,8 @@ public void Should_not_fail_if_undefined_value_is_not_an_allowed_value(string? i | |
[InlineData("localhost.com/test")] | ||
[InlineData("192.168.0.101")] | ||
[InlineData("randomString")] | ||
public void Should_fail_if_url_is_invalid(string? input) | ||
[InlineData("mqtt://localhost:1883/")] | ||
public void Should_fail_if_http_url_is_invalid(string? input) | ||
{ | ||
var source = new Dictionary<string, string> | ||
{ | ||
|
@@ -182,7 +183,7 @@ public void Should_fail_if_url_is_invalid(string? input) | |
[InlineData("http://localhost/test")] | ||
[InlineData("https://example.com/test?query=example")] | ||
[InlineData("http://login:[email protected]/random")] | ||
public void Should_get_url_if_value_is_valid(string? input) | ||
public void Should_get_http_url_if_value_is_valid(string? input) | ||
{ | ||
var source = new Dictionary<string, string> | ||
{ | ||
|