In acceptance or integration tests of your .NET application, you probably want to mock external HTTP services so you can focus on testing your implemented logic. For this purpose, you might want to mock your HttpClient or its HttpMessageHandler, which is only a partial solution as it does not run HTTP over the wire. Or you can spin off Docker containers that will return responses you configured beforehand using some API, which requires a lot of boilerplate code and cannot be parallelized well.

MockH is a small library that allows you to do both - run real HTTP requests and configure the responses in code, directly within your test. As it is designed to have no side effects, it can run in parallel and does not mess with ASP.NET Co…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help