Releases: maxkagamine/Moq.Contrib.HttpClient
Releases · maxkagamine/Moq.Contrib.HttpClient
v1.4.0
- System.Text.Json support via new ReturnsJsonResponse
- Applied a fix for a breaking change in .NET 7 Preview (#11)
match
predicate is now memoized so methods like ReadFromJsonAsync that close the request stream can be used (see example in #13)
v1.3.0
- Return new response instance on each request (#4)
- Prevents subsequent requests to the same setup from receiving already-disposed instances. This can happen either by the code under test wrapping the response in a
using
or by HttpClient's GetStringAsync and GetByteArrayAsync which do the same. - Streams passed to ReturnsResponse are now wrapped to allow multiple requests/setups to read from the same stream without interfering with each other (if seekable, such as MemoryStream).
- The RequestMessage property on HttpResponseMessage is now correctly populated (except SetupRequestSequence).
- Prevents subsequent requests to the same setup from receiving already-disposed instances. This can happen either by the code under test wrapping the response in a
v1.2.0
Initial release