Questions tagged [dependency-injection]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer

How to I mock a void service that returns values in one of its arguments?

Let's say I have a typical fflib service class with a void method (Application.cls omitted for clarity) public class MyService { public static void doStuffInSitu(String someContext, MyWrapper ...
cropredy's user avatar
  • 69k
1 vote
1 answer

How to mock, inject or otherwise make Custom Metadata available to apex tests

I have some code which relies on some Custom Metadata records to exist, but I don't want my tests to depend on real records in the org. How can I either inject or mock custom metadata records into ...
ministe's user avatar
  • 324