Problem Statement
var httpClientFactory = IHttpClientFactory.Mock(MockBehavior.Strict);
var httpClient = Mock.HttpClient("https://my.domain/");
httpClientFactory.CreateClient("myClient").Returns(httpClient);
// This will not match, it requires the `/` in front
httpClient.Handler.OnPost("my_endpoint").Respond(HttpStatusCode.Accepted);
// This works
httpClient.Handler.OnPost("/my_endpoint").Respond(HttpStatusCode.Accepted);
Proposed Solution
It's easy to miss and be overlooked when trying to figure out the problem, so my input is to by default check if the / is there, if not, simply add it internally
Feature Category
Test Mocking
How important is this feature to you?
QOL
Problem Statement
Proposed Solution
It's easy to miss and be overlooked when trying to figure out the problem, so my input is to by default check if the
/is there, if not, simply add it internallyFeature Category
Test Mocking
How important is this feature to you?
QOL