FakeItEasy and a case of method configuration

By | April 24, 2015
Recently while writing unit tests for a device driver I came across a situation.

I had to simulate the call to the device to wait for sometime and then throw an error and then check if I handled it properly.

This helped.

This configures the Start method (which in real life issues command to the device and waits for response) to wait for 1 sec and then throw.

 

Leave a Reply