apex-enterprise-patterns / fflib-apex-mocks

An Apex mocking framework for true unit testing in Salesforce, with Stub API support
BSD 3-Clause "New" or "Revised" License
423 stars 214 forks source link

Method not recorded for void method that throws exception #9

Closed jondavis9898 closed 8 years ago

jondavis9898 commented 8 years ago

When mocking a Void method that throws an exception, it appears that the method will not be recorded since the exception is thrown before recording the method call.

Should line 214 move to line 207? https://github.com/financialforcedev/fflib-apex-mocks/blob/master/src/classes/fflib_ApexMocks.cls#L214

afawcett commented 8 years ago

@frup42 thoughts?

dfruddffdc commented 8 years ago

It certainly should https://github.com/financialforcedev/fflib-apex-mocks/pull/12

jondavis9898 commented 8 years ago

Thank you!