Friday November 27th

Thursday November 26th

Wednesday November 25th

3 Kicks

RESTful Client Unit Testing with NancyFX

An interesting approach to verifying the behavior of a RESTful client by using the NancyFX server to stub out the target service. A brief description of the problem with lots of sample code is provided.


Using the approach in the article, we're still prone to test failures should something go wrong starting up Nancy (this should be evident by the code that had to be written to wait and ensure it has started). What can you do if Nancy fails to start? Fail the test? Then you have to spend time diagnosing why it won't start, when all you really need to do is stub the GetOrders function to return a static list of orders.

I would have to agree with the above comment. I like to do my unit tests ensuring everything works within methods the way it is supposed to first. From there, any web service communication can be isolated and tested for accuracy. Seems like with Nancy, you are adding one more layer that may or may not be the problem at hand.

Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network