Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 326 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 326
Topic #: 1
[All Certified Platform Developer II Questions]

A developer wrote the following method to find all the test accounts in the org:



However, the test method below fails.



What should be used to fix this failing test?

  • A. Test.loadData to set up expected data
  • B. @isTear(SeeAllData=true) to access org data for the test
  • C. Test.fixedSearchResults() method to set up expected data
  • D. @testSetup method to set up expected data
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
stan_malta
1 year ago
Selected Answer: C
C, same question and correct answer a few questions below
upvoted 1 times
...
BrucePark
1 year, 3 months ago
C seems to want to say Test.setFixedSearchResults
upvoted 2 times
...
ejh
1 year, 8 months ago
Selected Answer: C
Answer is C https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_SOSL.htm
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...