Quantcast
Channel: Salesforce Trigger Handler Framework - Testing the Trigger - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 3

Salesforce Trigger Handler Framework - Testing the Trigger

$
0
0

I'm looking at implementing a trigger handler framework and I understand the benefits of separation, dispatching to helpers from the handler, etc.

What hasn't been obvious looking over the materials from the various frameworks, is how to test the trigger if the handler calls a helper which executes a callout in an async process?

Does the triggers own test class need to set a mock so it is in the call stack if the helpers handler attempts to callout?

Meaning, the mock is established in 2-3 places:a) in the helper's own test classb) in the handler's test class to cover the helper invocationc) in the trigger's test class to cover the lines that invoke the handler that does b)


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>