mock_exceptions library
Supports the registration of Invocation matchers and exceptions. When actual calls are made, the method checks if it should throw an exception. If not, it is free to behave normally.
Functions
-
maybeThrowException(
Object o, Invocation i) → void - To be used within Fakes. The method calls this to throw an exception if a matching invocation has been registered. If not, the method can behave normally.
-
whenCalling(
Invocation i) → PostWhenCalling -
Named differently from Mockito's
when
to prevent conflicts.