Skip to content

Commit

Permalink
Fix broken build
Browse files Browse the repository at this point in the history
+semver: patch
  • Loading branch information
natenho committed Mar 11, 2024
1 parent 29ce70d commit 570cdc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Mockaco.AspNetCore/Extensions/ObjectExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ internal static class ObjectExtensions
private static readonly JsonSerializerSettings _jsonSerializerSettings = new JsonSerializerSettings
{
Formatting = Formatting.Indented,
Converters = [
new StringEnumConverter { NamingStrategy = new CamelCaseNamingStrategy()},
new SimpleExceptionConverter()
],
Converters = new JsonConverter[] {
new StringEnumConverter { NamingStrategy = new CamelCaseNamingStrategy()},
new SimpleExceptionConverter()
},
NullValueHandling = NullValueHandling.Ignore
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public async Task Writes_Unhandled_Exceptions_Thrown_In_Inner_Middlewares_As_Err
var bodyAsJToken = JToken.Parse(body);

bodyAsJToken.Should().NotBeNullOrEmpty();
bodyAsJToken.SelectToken("$[0].Exception.ClassName").ToString().Should().Be(anyException.GetType().FullName);
bodyAsJToken.SelectToken("$[0].Exception.Type").ToString().Should().Be(anyException.GetType().Name);
bodyAsJToken.SelectToken("$[0].Exception.Message").ToString().Should().Be(anyException.Message);
httpContext.Response.StatusCode.Should().Be(501);
httpContext.Response.ContentType.Should().Be("application/json");
Expand Down

0 comments on commit 570cdc3

Please sign in to comment.