@@ -30,4 +30,87 @@ public void Combine_must_handle_empty_array() =>
30
30
31
31
[ Test ]
32
32
public void Combine_must_handle_null ( ) => Assert . Throws < ArgumentNullException > ( ( ) => WebPath . Combine ( null ) ) ;
33
+
34
+
35
+ [ Test ]
36
+ [ TestCase ( "ftp://hello.com/" , UriKind . Absolute , ExpectedResult = true ) ]
37
+ [ TestCase ( "file:///hello.com/" , UriKind . Absolute , ExpectedResult = true ) ]
38
+ [ TestCase ( "ws://hello.com/" , UriKind . Absolute , ExpectedResult = true ) ]
39
+ [ TestCase ( "wss://hello.com/" , UriKind . Absolute , ExpectedResult = true ) ]
40
+ [ TestCase ( "https://hello.com:8080/" , UriKind . Absolute , ExpectedResult = true ) ]
41
+ [ TestCase ( "http://hello.com:8080/" , UriKind . Absolute , ExpectedResult = true ) ]
42
+ [ TestCase ( "https://hello.com/path" , UriKind . Absolute , ExpectedResult = true ) ]
43
+ [ TestCase ( "http://hello.com/path" , UriKind . Absolute , ExpectedResult = true ) ]
44
+ [ TestCase ( "https://hello.com/path?query=param" , UriKind . Absolute , ExpectedResult = true ) ]
45
+ [ TestCase ( "http://hello.com/path?query=param" , UriKind . Absolute , ExpectedResult = true ) ]
46
+ [ TestCase ( "https://hello.com/path#fragment" , UriKind . Absolute , ExpectedResult = true ) ]
47
+ [ TestCase ( "http://hello.com/path#fragment" , UriKind . Absolute , ExpectedResult = true ) ]
48
+ [ TestCase ( "https://hello.com/path?query=param#fragment" , UriKind . Absolute , ExpectedResult = true ) ]
49
+ [ TestCase ( "http://hello.com/path?query=param#fragment" , UriKind . Absolute , ExpectedResult = true ) ]
50
+ [ TestCase ( "https://hello.com:8080/path?query=param#fragment" , UriKind . Absolute , ExpectedResult = true ) ]
51
+ [ TestCase ( "http://hello.com:8080/path?query=param#fragment" , UriKind . Absolute , ExpectedResult = true ) ]
52
+ [ TestCase ( "//hello.com:8080/path?query=param#fragment" , UriKind . Absolute , ExpectedResult = true ) ]
53
+ [ TestCase ( "//hello.com:8080/path" , UriKind . Absolute , ExpectedResult = true ) ]
54
+ [ TestCase ( "//hello.com:8080" , UriKind . Absolute , ExpectedResult = true ) ]
55
+ [ TestCase ( "//hello.com" , UriKind . Absolute , ExpectedResult = true ) ]
56
+ [ TestCase ( "/test/test.jpg" , UriKind . Absolute , ExpectedResult = false ) ]
57
+ [ TestCase ( "/test" , UriKind . Absolute , ExpectedResult = false ) ]
58
+ [ TestCase ( "test" , UriKind . Absolute , ExpectedResult = false ) ]
59
+ [ TestCase ( "" , UriKind . Absolute , ExpectedResult = false ) ]
60
+ [ TestCase ( null , UriKind . Absolute , ExpectedResult = false ) ]
61
+ [ TestCase ( "this is not welformed" , UriKind . Absolute , ExpectedResult = false ) ]
62
+ [ TestCase ( "ftp://hello.com/" , UriKind . Relative , ExpectedResult = false ) ]
63
+ [ TestCase ( "file:///hello.com/" , UriKind . Relative , ExpectedResult = false ) ]
64
+ [ TestCase ( "ws://hello.com/" , UriKind . Relative , ExpectedResult = false ) ]
65
+ [ TestCase ( "wss://hello.com/" , UriKind . Relative , ExpectedResult = false ) ]
66
+ [ TestCase ( "https://hello.com:8080/" , UriKind . Relative , ExpectedResult = false ) ]
67
+ [ TestCase ( "http://hello.com:8080/" , UriKind . Relative , ExpectedResult = false ) ]
68
+ [ TestCase ( "https://hello.com/path" , UriKind . Relative , ExpectedResult = false ) ]
69
+ [ TestCase ( "http://hello.com/path" , UriKind . Relative , ExpectedResult = false ) ]
70
+ [ TestCase ( "https://hello.com/path?query=param" , UriKind . Relative , ExpectedResult = false ) ]
71
+ [ TestCase ( "http://hello.com/path?query=param" , UriKind . Relative , ExpectedResult = false ) ]
72
+ [ TestCase ( "https://hello.com/path#fragment" , UriKind . Relative , ExpectedResult = false ) ]
73
+ [ TestCase ( "http://hello.com/path#fragment" , UriKind . Relative , ExpectedResult = false ) ]
74
+ [ TestCase ( "https://hello.com/path?query=param#fragment" , UriKind . Relative , ExpectedResult = false ) ]
75
+ [ TestCase ( "http://hello.com/path?query=param#fragment" , UriKind . Relative , ExpectedResult = false ) ]
76
+ [ TestCase ( "https://hello.com:8080/path?query=param#fragment" , UriKind . Relative , ExpectedResult = false ) ]
77
+ [ TestCase ( "http://hello.com:8080/path?query=param#fragment" , UriKind . Relative , ExpectedResult = false ) ]
78
+ [ TestCase ( "//hello.com:8080/path?query=param#fragment" , UriKind . Relative , ExpectedResult = false ) ]
79
+ [ TestCase ( "//hello.com:8080/path" , UriKind . Relative , ExpectedResult = false ) ]
80
+ [ TestCase ( "//hello.com:8080" , UriKind . Relative , ExpectedResult = false ) ]
81
+ [ TestCase ( "//hello.com" , UriKind . Relative , ExpectedResult = false ) ]
82
+ [ TestCase ( "/test/test.jpg" , UriKind . Relative , ExpectedResult = true ) ]
83
+ [ TestCase ( "/test" , UriKind . Relative , ExpectedResult = true ) ]
84
+ [ TestCase ( "test" , UriKind . Relative , ExpectedResult = true ) ]
85
+ [ TestCase ( "" , UriKind . Relative , ExpectedResult = false ) ]
86
+ [ TestCase ( null , UriKind . Relative , ExpectedResult = false ) ]
87
+ [ TestCase ( "this is not welformed" , UriKind . Relative , ExpectedResult = false ) ]
88
+ [ TestCase ( "ftp://hello.com/" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
89
+ [ TestCase ( "file:///hello.com/" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
90
+ [ TestCase ( "ws://hello.com/" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
91
+ [ TestCase ( "wss://hello.com/" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
92
+ [ TestCase ( "https://hello.com:8080/" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
93
+ [ TestCase ( "http://hello.com:8080/" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
94
+ [ TestCase ( "https://hello.com/path" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
95
+ [ TestCase ( "http://hello.com/path" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
96
+ [ TestCase ( "https://hello.com/path?query=param" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
97
+ [ TestCase ( "http://hello.com/path?query=param" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
98
+ [ TestCase ( "https://hello.com/path#fragment" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
99
+ [ TestCase ( "http://hello.com/path#fragment" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
100
+ [ TestCase ( "https://hello.com/path?query=param#fragment" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
101
+ [ TestCase ( "http://hello.com/path?query=param#fragment" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
102
+ [ TestCase ( "https://hello.com:8080/path?query=param#fragment" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
103
+ [ TestCase ( "http://hello.com:8080/path?query=param#fragment" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
104
+ [ TestCase ( "//hello.com:8080/path?query=param#fragment" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
105
+ [ TestCase ( "//hello.com:8080/path" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
106
+ [ TestCase ( "//hello.com:8080" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
107
+ [ TestCase ( "//hello.com" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
108
+ [ TestCase ( "/test/test.jpg" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
109
+ [ TestCase ( "/test" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
110
+ [ TestCase ( "test" , UriKind . RelativeOrAbsolute , ExpectedResult = true ) ]
111
+ [ TestCase ( "" , UriKind . RelativeOrAbsolute , ExpectedResult = false ) ]
112
+ [ TestCase ( null , UriKind . RelativeOrAbsolute , ExpectedResult = false ) ]
113
+ [ TestCase ( "this is not welformed" , UriKind . RelativeOrAbsolute , ExpectedResult = false ) ]
114
+ public bool IsWellFormedWebPath ( string ? webPath , UriKind uriKind ) => WebPath . IsWellFormedWebPath ( webPath , uriKind ) ;
115
+
33
116
}
0 commit comments