diff --git a/Chapter-1-initial-architecture/Src/Fitnet.UnitTests/GlobalExceptionHandlerTests.cs b/Chapter-1-initial-architecture/Src/Fitnet.UnitTests/GlobalExceptionHandlerTests.cs index f76823c1..11372fcf 100644 --- a/Chapter-1-initial-architecture/Src/Fitnet.UnitTests/GlobalExceptionHandlerTests.cs +++ b/Chapter-1-initial-architecture/Src/Fitnet.UnitTests/GlobalExceptionHandlerTests.cs @@ -5,6 +5,7 @@ namespace EvolutionaryArchitecture.Fitnet.UnitTests; using System.Net; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; +using Newtonsoft.Json; public sealed class GlobalExceptionHandlerTests { @@ -61,8 +62,7 @@ private async Task GetExceptionResponseMessage() _context.Response.Body.Seek(0, SeekOrigin.Begin); using var streamReader = new StreamReader(_context.Response.Body); var responseBody = await streamReader.ReadToEndAsync(); - var problemDetails = JsonSerializer.Deserialize(responseBody); - + var problemDetails = JsonConvert.DeserializeObject(responseBody); return problemDetails!; } } diff --git a/Chapter-1-initial-architecture/Src/Fitnet.UnitTests/GlobalUsings.cs b/Chapter-1-initial-architecture/Src/Fitnet.UnitTests/GlobalUsings.cs index 2b655069..d4802e93 100644 --- a/Chapter-1-initial-architecture/Src/Fitnet.UnitTests/GlobalUsings.cs +++ b/Chapter-1-initial-architecture/Src/Fitnet.UnitTests/GlobalUsings.cs @@ -1,9 +1,8 @@ // Global using directives global using System.Collections; -global using System.Text.Json; global using Bogus; global using FluentAssertions; global using Microsoft.AspNetCore.Http; global using NSubstitute; -global using Xunit; \ No newline at end of file +global using Xunit;