What is the correct way to fix this?

The test method above tests an Apex trigger that the developer knows will make a lot of queries when a lot of Account are simultaneously updated to be customer.

The test method fails at the Line 20 because of too many SOQL queries

What is the correct way to fix this?
A . Add TesLstartTest() before and Test.stop Test() after both Line 7 of the code and Line 20 of the code.
B. Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced.
C. Add TeststartTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code.
D. Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger.

Answer: C

Latest PDII Dumps Valid Version with 280 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments