From 2d38d52c92834fbdb2a73aecd43e01de1ff3e195 Mon Sep 17 00:00:00 2001 From: Aymen TROUDI Date: Wed, 5 Jun 2024 00:24:21 +0200 Subject: [PATCH] Upgrade nuget packages --- global.json | 3 ++- src/WebApi/WebApi.csproj | 4 ++-- test/IntegrationTests/IntegrationTests.csproj | 13 ++++++++----- test/UnitTests/TenantIdMiddlewareTests.cs | 9 ++++++--- test/UnitTests/UnitTests.csproj | 11 +++++++---- 5 files changed, 25 insertions(+), 15 deletions(-) diff --git a/global.json b/global.json index 31b25d0..b5b37b6 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,7 @@ { "sdk": { - "version": "net8.0", + "version": "8.0.0", + "rollForward": "latestMajor", "allowPrerelease": false } } \ No newline at end of file diff --git a/src/WebApi/WebApi.csproj b/src/WebApi/WebApi.csproj index 48900f1..005da98 100644 --- a/src/WebApi/WebApi.csproj +++ b/src/WebApi/WebApi.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/test/IntegrationTests/IntegrationTests.csproj b/test/IntegrationTests/IntegrationTests.csproj index 3228eac..7ecec9b 100644 --- a/test/IntegrationTests/IntegrationTests.csproj +++ b/test/IntegrationTests/IntegrationTests.csproj @@ -10,12 +10,15 @@ - + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/test/UnitTests/TenantIdMiddlewareTests.cs b/test/UnitTests/TenantIdMiddlewareTests.cs index f08f547..037385c 100644 --- a/test/UnitTests/TenantIdMiddlewareTests.cs +++ b/test/UnitTests/TenantIdMiddlewareTests.cs @@ -23,13 +23,14 @@ public class TenantIdMiddlewareTests public async Task InvokeAsync_When_TenantId_Is_Valid_Then_Should_Return_Ok_StatusCode(string tenantId) { // arrange + using var body = new MemoryStream(); var next = BuildRequestDelegate(); var options = Options.Create(new Settings()); var context = new DefaultHttpContext { Response = { - Body = new MemoryStream(), + Body = body, }, Request = { @@ -59,13 +60,14 @@ public async Task InvokeAsync_When_TenantId_Is_Valid_Then_Should_Return_Ok_Statu public async Task InvokeAsync_When_TenantId_Is_Not_Valid_Then_Should_Return_BadRequest_StatusCode(string tenantId) { // arrange + using var body = new MemoryStream(); var next = BuildRequestDelegate(); var options = Options.Create(new Settings()); var context = new DefaultHttpContext { Response = { - Body = new MemoryStream(), + Body = body, }, Request = { @@ -93,6 +95,7 @@ public async Task InvokeAsync_When_TenantId_Is_Not_Valid_Then_Should_Return_BadR public async Task InvokeAsync_When_Path_Is_Excluded_Then_Should_Return_Ok_StatusCode(string path) { // arrange + using var body = new MemoryStream(); var next = BuildRequestDelegate(); var options = Options.Create(new Settings { @@ -102,7 +105,7 @@ public async Task InvokeAsync_When_Path_Is_Excluded_Then_Should_Return_Ok_Status { Response = { - Body = new MemoryStream(), + Body = body, }, Request = { diff --git a/test/UnitTests/UnitTests.csproj b/test/UnitTests/UnitTests.csproj index 2a62478..2237d8c 100644 --- a/test/UnitTests/UnitTests.csproj +++ b/test/UnitTests/UnitTests.csproj @@ -10,12 +10,15 @@ - + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all