Avanade / UnitTestEx

UnitTestEx provides .NET testing extensions to the most popular testing frameworks (MSTest, NUnit and Xunit) specifically to improve the testing experience with ASP.NET controller, and Azure Function, execution including underlying HttpClientFactory mocking.
MIT License
18 stars 4 forks source link

Result not being output in log correctly #27

Closed chullybun closed 2 years ago

chullybun commented 2 years ago

For example, the TypeTester logs the result. As the result maybe IActionResult, this has no inherent properties so when serialized using default serializer an empty object is returned {}. To correctly enable for logging the type should be specified as dynamic:

Implementor.WriteLine(JsonSerializer.Serialize<dynamic>(result, JsonWriteFormat.Indented));
chullybun commented 2 years ago

Resolved in package v1.0.13.