Skip to content

Leaping Gorilla Testing 4.2.15

Compare
Choose a tag to compare
@gary-lg gary-lg released this 17 Apr 16:10
· 25 commits to master since this release
50d8fb5

The When attribute is used to specify the entry point for your test and marks the method which will be executed by the LeapingGorilla.Testing library. This release adds an optional parameter to the When attribute:

  • DoNotRethrowExceptions.

Any exceptions that occur during execution of your When method will be unwrapped and stored in the ThrownException property. You can then Assert against the ThrownException property in your tests to ensure that an Exception did (or did not) occur.

Additionally if DoNotRethrowExceptions is set to true then the exception will not be rethrown - it will just be swallowed meaning no need for you to wrap your statements in the When method with a try/catch