File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
RestSharp.IntegrationTests
RestSharp.Tests.Shared/Extensions Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ public void Can_Authenticate_Netflix_With_OAuth() {
42
42
43
43
Assert . NotNull ( response ) ;
44
44
Assert . Equal ( HttpStatusCode . OK , response . StatusCode ) ;
45
-
46
45
47
46
var qs = new Uri ( response . Content ) . ParseQuery ( ) ;
48
47
var oauthToken = qs [ "oauth_token" ] ;
@@ -197,9 +196,10 @@ public void Can_Authenticate_OAuth1_With_Querystring_Parameters() {
197
196
authenticator . Authenticate ( client , request ) ;
198
197
199
198
var requestUri = client . BuildUri ( request ) ;
200
- var actual = new Uri ( requestUri . Query ) . ParseQuery ( ) . Select ( x => x . Key ) . ToList ( ) ;
199
+ var actual = requestUri . ParseQuery ( ) . Select ( x => x . Key ) . ToList ( ) ;
201
200
202
- Assert . True ( actual . SequenceEqual ( expected ) ) ;
201
+ actual . Should ( ) . BeEquivalentTo ( expected ) ;
202
+ // Assert.True(actual.SequenceEqual(expected));
203
203
}
204
204
205
205
[ Fact ( Skip = "Provide your own consumer key/secret before running" ) ]
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ namespace RestSharp.Tests.Shared.Extensions;
2
2
3
3
public static class UriExtensions {
4
4
public static IDictionary < string , string > ParseQuery ( this Uri uri ) {
5
- var query = uri . Query . Split ( '&' ) ;
5
+ var query = uri . Query . Substring ( 1 ) . Split ( '&' ) ;
6
6
return query . Select ( x => x . Split ( '=' ) ) . ToDictionary ( x => x [ 0 ] , x => x [ 1 ] ) ;
7
7
}
8
8
}
You can’t perform that action at this time.
0 commit comments