testing

Testing tools, testing philosophy & methodology...
olfal 2017-03-21T20:18:16.191881Z

Hi! What would be the best way to implement a stub of the form “throw X, when Y” in a unit test? In Java with Mockito, this would be the equivalent https://static.javadoc.io/org.mockito/mockito-core/2.7.19/org/mockito/Mockito.html#12

olfal 2017-03-21T20:18:56.208578Z

If you know of any lib/framework that already does this, it would be great 🙂

olfal 2017-03-21T20:34:48.605618Z

I finally managed to implement it using with-redefs. It works well but is not very elegant imo.