Salesforce Decode
Salesforcedecode
DevOps & Testing questionsQuestion 27 of 100
DevOps & TestingAdvancedConceptualtestingmockingdependency-injection

What is dependency injection and how does it help Apex testing?

Scenario

A service class directly calls a selector that queries 6 objects, making tests slow.

Answer it out loud first

Serious prep means attempting before reading. Take two minutes to structure your answer, then compare.