hibri / HttpMock

A library for creating Http servers on the fly in tests and stubbing responses
MIT License
128 stars 44 forks source link

To Make HttpMock independent of NUnit #30

Closed stevenao closed 8 years ago

stevenao commented 9 years ago

it will be nice that the core project HttpMock is independent of any testing library. Some users might have another choice of their testing framework. One could argue that we should make a HttpMock.XUnit library or HttpMock.MsTest library. To me, that will go to the spiral of support problems to support all existing and future testing frameworks. My solution is to delegate the assertion functionality to the hosting project to implement the IHttpMockAssert interface. That way users can use any testing framework they want.

hibri commented 9 years ago

@stevenao I'd like to take an approach similar to coypu. See https://github.com/featurist/coypu#matchers and https://github.com/featurist/coypu/tree/master/src/Coypu.NUnit/Matchers

where the matchers and the asserts are in a different assembly altogether. I'd like to give a client of HttpMock a default implementation, instead of having to write the assertion library. We could refactor the existing IHttpServer interface to expose more of what has happened, and build a more richer assertation library around it. This way we can remove the assertation logic from the core library itself.

Thoughts ?