Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #156 from microsoft/dependabot/nuget/xunit-2.6.0
Browse files Browse the repository at this point in the history
Bump xunit from 2.5.3 to 2.6.0
  • Loading branch information
github-actions[bot] authored Nov 2, 2023
2 parents c3277ce + e9e9bfa commit 3ddf8e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.7.2" />
<PackageReference Include="Moq" Version="4.20.69" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit" Version="2.6.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
Expand Down Expand Up @@ -161,7 +161,7 @@ public async Task RedirectWithDifferentSchemeThrowsInvalidOperationExceptionIfAl
redirectResponse.Headers.Location = new Uri("http://example.org/bar");
this._testHttpMessageHandler.SetHttpResponse(redirectResponse, new HttpResponseMessage(HttpStatusCode.OK));// sets the mock response
// Act
var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await this._invoker.SendAsync(httpRequestMessage, CancellationToken.None));
var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => this._invoker.SendAsync(httpRequestMessage, CancellationToken.None));
// Assert
Assert.Contains("Redirects with changing schemes not allowed by default", exception.Message);
Assert.Equal("Scheme changed from https to http.", exception.InnerException?.Message);
Expand Down Expand Up @@ -233,7 +233,7 @@ public async Task ExceedMaxRedirectsShouldThrowsException()
response2.Headers.Location = new Uri("http://example.org/foo");
this._testHttpMessageHandler.SetHttpResponse(response1, response2);// sets the mock response
// Act
var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await this._invoker.SendAsync(
var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => this._invoker.SendAsync(
httpRequestMessage, CancellationToken.None));
// Assert
Assert.Equal("Too many redirects performed", exception.Message);
Expand Down

0 comments on commit 3ddf8e0

Please sign in to comment.