
SalesforceCertified Platform Developer II
Domain 7Objective 1
Describe the Best Practices for Unit Testing in Apex. PLATFORM-DEVELOPER-II Practice Questions (Page 2)
Part of the TESTING domain, which accounts for 7% of the PLATFORM-DEVELOPER-II exam.
31questions here
7free pages
10concepts
7%of the exam
Questions 6–10
- 6
Which method is used to execute a block of code as a specific user in an Apex test?
Select an answer first - 7
A developer is testing a class that uses a @future method to update Account records after an insert. The test inserts an Account, calls the method, and then checks that the Account's Status field was updated. The test currently fails because the future method has not completed. What is the correct way to fix this test?
Select an answer first - 8
Which of the following is a best practice for creating test data in Apex?
Select an answer first - 9
Which assertion method should you use to verify that a variable is not equal to a specific value?
Select an answer first - 10
What is the correct sequence for testing a future method in Apex?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by Salesforce. “PLATFORM-DEVELOPER-II” is a trademark of its owner, used for identification only.