This repository was archived by the owner on Jul 9, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Microsoft.Kiota.Http.HttpClientLibrary.Tests Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 18
18
<PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.7.2" />
19
19
<PackageReference Include =" Microsoft.TestPlatform.ObjectModel" Version =" 17.7.2" />
20
20
<PackageReference Include =" Moq" Version =" 4.20.69" />
21
- <PackageReference Include =" xunit" Version =" 2.5.3 " />
21
+ <PackageReference Include =" xunit" Version =" 2.6.0 " />
22
22
<PackageReference Include =" xunit.runner.visualstudio" Version =" 2.5.3" >
23
23
<IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
24
24
<PrivateAssets >all</PrivateAssets >
Original file line number Diff line number Diff line change 1
- using System ;
1
+ using System ;
2
2
using System . Net ;
3
3
using System . Net . Http ;
4
4
using System . Net . Http . Headers ;
@@ -161,7 +161,7 @@ public async Task RedirectWithDifferentSchemeThrowsInvalidOperationExceptionIfAl
161
161
redirectResponse . Headers . Location = new Uri ( "http://example.org/bar" ) ;
162
162
this . _testHttpMessageHandler . SetHttpResponse ( redirectResponse , new HttpResponseMessage ( HttpStatusCode . OK ) ) ; // sets the mock response
163
163
// Act
164
- var exception = await Assert . ThrowsAsync < InvalidOperationException > ( async ( ) => await this . _invoker . SendAsync ( httpRequestMessage , CancellationToken . None ) ) ;
164
+ var exception = await Assert . ThrowsAsync < InvalidOperationException > ( ( ) => this . _invoker . SendAsync ( httpRequestMessage , CancellationToken . None ) ) ;
165
165
// Assert
166
166
Assert . Contains ( "Redirects with changing schemes not allowed by default" , exception . Message ) ;
167
167
Assert . Equal ( "Scheme changed from https to http." , exception . InnerException ? . Message ) ;
@@ -233,7 +233,7 @@ public async Task ExceedMaxRedirectsShouldThrowsException()
233
233
response2 . Headers . Location = new Uri ( "http://example.org/foo" ) ;
234
234
this . _testHttpMessageHandler . SetHttpResponse ( response1 , response2 ) ; // sets the mock response
235
235
// Act
236
- var exception = await Assert . ThrowsAsync < InvalidOperationException > ( async ( ) => await this . _invoker . SendAsync (
236
+ var exception = await Assert . ThrowsAsync < InvalidOperationException > ( ( ) => this . _invoker . SendAsync (
237
237
httpRequestMessage , CancellationToken . None ) ) ;
238
238
// Assert
239
239
Assert . Equal ( "Too many redirects performed" , exception . Message ) ;
You can’t perform that action at this time.
0 commit comments