Mocking HTTP client errors #686
Replies: 2 comments 6 replies
|
Hey @ProjectFoxx, can you post one complete and minimal example? Especially the error of |
|
Hey @linkdotnet Thx for responding
Stacktrace: Also tried this one from the richard github var mockHttp = new MockHttpMessageHandler(); This test runs but it is without the component Hope you can help me |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hey everyone,
Hope someone can help me
I was trying to mock the HTTP client and i followed the docs
https://bunit.dev/docs/test-doubles/mocking-httpclient.html
But when i have the line in the AddMockHttpClient function
services.AddSingleton(httpClient); i get an error so i commented that one
I removed that code and also tried the code from the docs from
https://github.com/richardszalay/mockhttp
Both times i get the error with no baseaddress set
My test has the following code :
But when i mocked the HTTP client i still have the error on the render component line that i dont have a Baseaddress set
All reactions