ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 358 - Certified Platform Developer II discussion

Report
Export

A developer wrote a class named AccountHistoryManager that relies on field history tracking. The class has a static method called getAccountHistory that takes in an Account as a parameter and returns a list of associated AccountHistroy object records.

The following test falls:

What should be done to make this test pass?

A.
Use test. Is Running test () in getAccountHostory () to conditionally return fake AccountHistory records.
Answers
A.
Use test. Is Running test () in getAccountHostory () to conditionally return fake AccountHistory records.
B.
Use @istest (SeeAll Data=true) to see historical data from the org and query for AccountHistory records.
Answers
B.
Use @istest (SeeAll Data=true) to see historical data from the org and query for AccountHistory records.
C.
Create AccountHistory records manually in the test setup and write a query to get them.
Answers
C.
Create AccountHistory records manually in the test setup and write a query to get them.
D.
The test method should be deleted since this code cannot be tested.
Answers
D.
The test method should be deleted since this code cannot be tested.
Suggested answer: A
asked 23/09/2024
Josie Moha
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first