Closed juamei closed 10 years ago
It looks like this could have been caused by this commit: https://github.com/hibri/HttpMock/commit/b81f3cec26d6c34c6a989d38b8f28d169329fef4
It's this line. The params are swapped. https://github.com/hibri/HttpMock/blob/master/src/HttpMock/RequestWasNotCalled.cs#L19
I think its the call before that. When I debug, this call to AssertHandler has the parameters the wrong way round. https://github.com/hibri/HttpMock/blob/master/src/HttpMock/RequestWasNotCalled.cs#L15
Thanks for fixing it so fast!
@juamei Pushed a new package 1.1.3. Let me know if you have any more issues. Thanks for the test to reproduce the issue.
The two Assert methods (AssertWasNotCalled & AssertWasCalled) in HttpServer are both broken. Debugging shows that the path and method parameters are called the wrong way round so in the test below path comes through as "POST" whilst method comes through as "/api/echo" or "/api/status". The simple nunit test method below shows AssertWasNotCalled returning true when it should return false.