ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 13 - Certified Platform Developer II discussion

Report
Export

An Apex class does not achieve expected code coverage. The testSetup method explicitly calls a method in the Apex class. How can the developer generate the code coverage?

A.
Add @testVisible to the method in the class the developer is testing.
Answers
A.
Add @testVisible to the method in the class the developer is testing.
B.
Use system.assert() in testSetup to verify the values are being returned.
Answers
B.
Use system.assert() in testSetup to verify the values are being returned.
C.
Call the Apex class method from a testMethod instead of the testSetup method.
Answers
C.
Call the Apex class method from a testMethod instead of the testSetup method.
D.
Verify the user has permissions passing a user into System.runAs().
Answers
D.
Verify the user has permissions passing a user into System.runAs().
Suggested answer: C
asked 23/09/2024
Joshua Muentes
46 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first