PrepAway - Latest Free Exam Questions & Answers

An Apex class does not achieve expected code coverage. The testSetup method explicitly calls a method the Apex

An Apex class does not achieve expected code coverage. The testSetup method explicitly calls a method the Apex class.

How can the developer generate the code coverage?

A. Verify the user has permissions passing a user into System.runAs().

B. Call the Apex class method from a testMethod instead of the testSetup method.
C. Add @testVisible to the method in the class the developer is testing.
D. Use system.assert() in testSetup to verify the values are being returned.


Leave a Reply