From 92a7a5d276e1ec725a4db20cca7fd3c66db1e794 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 21:10:23 +0000 Subject: [PATCH 1/2] Bump xunit from 2.5.3 to 2.6.0 Bumps [xunit](https://github.com/xunit/xunit) from 2.5.3 to 2.6.0. - [Commits](https://github.com/xunit/xunit/compare/2.5.3...2.6.0) --- updated-dependencies: - dependency-name: xunit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .../Microsoft.Kiota.Http.HttpClientLibrary.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Microsoft.Kiota.Http.HttpClientLibrary.Tests.csproj b/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Microsoft.Kiota.Http.HttpClientLibrary.Tests.csproj index 50b58e7..cca8f5b 100644 --- a/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Microsoft.Kiota.Http.HttpClientLibrary.Tests.csproj +++ b/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Microsoft.Kiota.Http.HttpClientLibrary.Tests.csproj @@ -18,7 +18,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all From e9e9bfa551949226b0d82969c7cc8e8c0b6d44dc Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Thu, 2 Nov 2023 08:02:48 +0300 Subject: [PATCH 2/2] Fixes broken tests --- .../Middleware/RedirectHandlerTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Middleware/RedirectHandlerTests.cs b/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Middleware/RedirectHandlerTests.cs index e191302..afe6242 100644 --- a/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Middleware/RedirectHandlerTests.cs +++ b/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Middleware/RedirectHandlerTests.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net; using System.Net.Http; using System.Net.Http.Headers; @@ -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(async () => await this._invoker.SendAsync(httpRequestMessage, CancellationToken.None)); + var exception = await Assert.ThrowsAsync(() => 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); @@ -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(async () => await this._invoker.SendAsync( + var exception = await Assert.ThrowsAsync(() => this._invoker.SendAsync( httpRequestMessage, CancellationToken.None)); // Assert Assert.Equal("Too many redirects performed", exception.Message);