nomad-software/dunit — pull request #11 by chris0210 (2014-02-26 12:24:26+00:00)
Title: Throw exceptions from mocked methods.

I noticed an issue when i tried to test the error-behaviour of one of my classes
Method A of my class calls Method B of the same class. I mocked method B so that it throws an exception in order to verify that method A behaves correctly in the case of an error.
However: the exceptions thrown in the mocked method are caught by dunit itself. This made it impossible to unit-test the error-behaviour.
I changed the code so that exceptions are rethrown if the mocked method is not nothrow. If the mocked method is nothrow, the code behaves as before and catches the exception and throws an assertion-error.