Skip to content

Commit

Permalink
fix: error handling tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilbaczek committed Dec 9, 2023
1 parent 8c0801b commit 0e99a53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -61,8 +62,7 @@ private async Task<ProblemDetails> 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<ProblemDetails>(responseBody);

var problemDetails = JsonConvert.DeserializeObject<ProblemDetails>(responseBody);
return problemDetails!;
}
}
Original file line number Diff line number Diff line change
@@ -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;
global using Xunit;

0 comments on commit 0e99a53

Please sign in to comment.