ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 378 - Certified Platform Developer II discussion

Report
Export

Consider the following code snippet:

A developer created the following test class to provide the proper code coverage for the snippet above:

However, when the test runs, no data is returned and the assertion fails.

However, when the test runs, no data is returned and the assertion fails.

Which edit should the developer make to ensure the test class runs successfully?

A.
Enclose the method call within Test. startTest () and Test , stop Test ()
Answers
A.
Enclose the method call within Test. startTest () and Test , stop Test ()
B.
Implement the seeAllData=true attribute in the @isTest annotation.
Answers
B.
Implement the seeAllData=true attribute in the @isTest annotation.
C.
Implement the without sharing keyword in the searchfeature Apex class.
Answers
C.
Implement the without sharing keyword in the searchfeature Apex class.
D.
Implement the setFixedSearchResults method in the test class.
Answers
D.
Implement the setFixedSearchResults method in the test class.
Suggested answer: D
asked 23/09/2024
Harold van den Meijdenberg
30 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first