hibri / HttpMock

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

Dependency on NUnit #57

Closed seanamosw closed 7 years ago

seanamosw commented 8 years ago

These files have a dependency on NUnit for it's Assert.That(..) method: RequestHandlerExpectExtensions.cs RequestWasCalled.cs RequestWasNotCalled.cs

For library consumers, they have to bring in NUnit even if they are using a different unit testing framework. This is a bit strange.

hibri commented 8 years ago

Hi @seanamosw , it was intentional, when I first wrote the library, NUnit was what we used, it has worked in for most scenarios. It's not idea however. I intend to remove the dependencies, and take a similar approach to Coypu. https://github.com/featurist/coypu/tree/master/src/Coypu.NUnit

It needs some work. Happy to take a PR if you are up for the challenge. I'm busy with other projects at the moment. :)

ghost commented 7 years ago

Please consider removing NUnit dependency. We don't use it at all. A mocking framework should work independent of the Unit testing framework.

hibri commented 7 years ago

Hi @jesaremi It is in the plan, and to move the assertions to a separate library. NUnit is used to provide the assertions only. I don't want to pull it out right away, without giving an alternative because the features are in use.

Will fix it when time allows :)

ghost commented 7 years ago

Thank you! Otherwise it's a really useful and intuitive framework. Thanks for creating it

hibri commented 7 years ago

Hi @jesaremi @seanamosw, I've published a new alpha package, removing the NUnit depedency. would love some feedback if this works on your projects before I publish a new 2.0 version.

Thanks

hibri commented 7 years ago

Fixed in #67