@@ -26,9 +26,9 @@ public void Get_ShouldSetHttpMethodAndRequestUri()
2626 {
2727 Request request = sut . Get ( "https://localhost" ) . Build ( ) ;
2828
29- Assert . Equal ( HttpMethod . Get , request . Method ) ;
29+ Assert . Equal ( HttpMethod . Get , request . Method . Value ) ;
3030 Assert . Equal ( UriPatternParser . Parse ( "https://localhost" ) , request . RequestUri ) ;
31- Assert . Null ( request . Version ) ;
31+ Assert . Equal ( new Any ( ) , request . Version . Value ) ;
3232 Assert . Equal ( new AnyHeader ( ) , request . Headers . Value ) ;
3333 Assert . Equal ( new AnyContent ( ) , request . Content . Value ) ;
3434 }
@@ -57,9 +57,9 @@ public void Post_ShouldBuildCorrectRequest()
5757 {
5858 Request request = sut . Post ( "https://localhost" , "{\" hello\" :1}" ) . Build ( ) ;
5959
60- Assert . Equal ( HttpMethod . Post , request . Method ) ;
60+ Assert . Equal ( HttpMethod . Post , request . Method . Value ) ;
6161 Assert . Equal ( UriPatternParser . Parse ( "https://localhost" ) , request . RequestUri ) ;
62- Assert . Null ( request . Version ) ;
62+ Assert . Equal ( new Any ( ) , request . Version . Value ) ;
6363 Assert . Equal ( new AnyHeader ( ) , request . Headers . Value ) ;
6464 Assert . Equal ( new Pattern ( "{\" hello\" :1}" ) , request . Content . Value ) ;
6565 }
@@ -83,9 +83,9 @@ public void PostAsJson_WithNullContent_ShouldBuildCorrectRequest()
8383 {
8484 Request request = sut . PostAsJson ( "https://localhost" , null ) . Build ( ) ;
8585
86- Assert . Equal ( HttpMethod . Post , request . Method ) ;
86+ Assert . Equal ( HttpMethod . Post , request . Method . Value ) ;
8787 Assert . Equal ( UriPatternParser . Parse ( "https://localhost" ) , request . RequestUri ) ;
88- Assert . Null ( request . Version ) ;
88+ Assert . Equal ( new Any ( ) , request . Version . Value ) ;
8989 Assert . Equivalent ( new Dictionary < string , Value > ( ) { [ "Content-Type" ] = Value . Pattern ( "application/json*" ) } , request . Headers . Value ) ;
9090 Assert . Equal ( new Pattern ( "null" ) , request . Content . Value ) ;
9191 }
@@ -95,9 +95,9 @@ public void PostAsJson_ShouldBuildCorrectRequest()
9595 {
9696 Request request = sut . PostAsJson ( "https://localhost" , new { hello = 1 } ) . Build ( ) ;
9797
98- Assert . Equal ( HttpMethod . Post , request . Method ) ;
98+ Assert . Equal ( HttpMethod . Post , request . Method . Value ) ;
9999 Assert . Equal ( UriPatternParser . Parse ( "https://localhost" ) , request . RequestUri ) ;
100- Assert . Null ( request . Version ) ;
100+ Assert . Equal ( new Any ( ) , request . Version . Value ) ;
101101 Assert . Equivalent ( new Dictionary < string , Value > ( ) { [ "Content-Type" ] = Value . Pattern ( "application/json*" ) } , request . Headers . Value ) ;
102102 Assert . Equal ( new Pattern ( "{\" hello\" :1}" ) , request . Content . Value ) ;
103103 }
@@ -115,9 +115,9 @@ public void WithJsonContent_WithNullContent_ShouldBuildCorrectRequest()
115115 {
116116 Request request = sut . WithJsonContent ( null ) . Build ( ) ;
117117
118- Assert . Null ( request . Method ) ;
119- Assert . Null ( request . RequestUri ) ;
120- Assert . Null ( request . Version ) ;
118+ Assert . Equal ( new Any ( ) , request . Method . Value ) ;
119+ Assert . Equal ( UriPattern . Any , request . RequestUri ) ;
120+ Assert . Equal ( new Any ( ) , request . Version . Value ) ;
121121 Assert . Equivalent ( new Dictionary < string , Value > ( ) { [ "Content-Type" ] = Value . Pattern ( "application/json*" ) } , request . Headers . Value ) ;
122122 Assert . Equal ( new Pattern ( "null" ) , request . Content . Value ) ;
123123 }
@@ -127,9 +127,9 @@ public void WithJsonContent_ShouldBuildCorrectRequest()
127127 {
128128 Request request = sut . WithJsonContent ( new { hello = 1 } ) . Build ( ) ;
129129
130- Assert . Null ( request . Method ) ;
131- Assert . Null ( request . RequestUri ) ;
132- Assert . Null ( request . Version ) ;
130+ Assert . Equal ( new Any ( ) , request . Method . Value ) ;
131+ Assert . Equal ( UriPattern . Any , request . RequestUri ) ;
132+ Assert . Equal ( new Any ( ) , request . Version . Value ) ;
133133 Assert . Equivalent ( new Dictionary < string , Value > ( ) { [ "Content-Type" ] = Value . Pattern ( "application/json*" ) } , request . Headers . Value ) ;
134134 Assert . Equal ( new Pattern ( "{\" hello\" :1}" ) , request . Content . Value ) ;
135135 }
@@ -144,9 +144,9 @@ public void WithJsonContent_WithCustomOptions_ShouldBuildCorrectRequest()
144144 } ;
145145 Request request = sut . WithJsonContent ( new { hello = 1 } , options ) . Build ( ) ;
146146
147- Assert . Null ( request . Method ) ;
148- Assert . Null ( request . RequestUri ) ;
149- Assert . Null ( request . Version ) ;
147+ Assert . Equal ( new Any ( ) , request . Method . Value ) ;
148+ Assert . Equal ( UriPattern . Any , request . RequestUri ) ;
149+ Assert . Equal ( new Any ( ) , request . Version . Value ) ;
150150 Assert . Equivalent ( new Dictionary < string , Value > ( ) { [ "Content-Type" ] = Value . Pattern ( "application/json*" ) } , request . Headers . Value ) ;
151151 Assert . Equal ( new Pattern ( """
152152 {
@@ -174,9 +174,9 @@ public void WithFormUrlEncodedContent_ShouldBuildCorrectRequest()
174174 {
175175 Request request = sut . WithFormUrlEncodedContent ( [ new KeyValuePair < string ? , string ? > ( "username" , "alice" ) ] ) . Build ( ) ;
176176
177- Assert . Null ( request . Method ) ;
178- Assert . Null ( request . RequestUri ) ;
179- Assert . Null ( request . Version ) ;
177+ Assert . Equal ( new Any ( ) , request . Method . Value ) ;
178+ Assert . Equal ( UriPattern . Any , request . RequestUri ) ;
179+ Assert . Equal ( new Any ( ) , request . Version . Value ) ;
180180 Assert . Equivalent ( new Dictionary < string , Value > ( ) { [ "Content-Type" ] = Value . Pattern ( "application/x-www-form-urlencoded*" ) } , request . Headers . Value ) ;
181181 Assert . Equal ( new Pattern ( "username=alice" ) , request . Content . Value ) ;
182182 }
0 commit comments