
SalesforceCertified Platform Developer I
Domain 5Objective 2
Describe How to Write Unit Tests for Triggers, Controllers, and Classes. PLATFORM-DEVELOPER-I Practice Questions (Page 3)
Part of the TESTING domain, which accounts for 12% of the PLATFORM-DEVELOPER-I exam.
22questions here
5free pages
8concepts
12%of the exam
Questions 11–15
- 11
When testing a controller's action method that returns a PageReference, what should the test assert?
Select an answer first - 12
Which DML operation would a unit test perform to exercise a trigger that fires on the 'before update' event?
Select an answer first - 13
A developer is writing a unit test for a custom controller that has a `save()` action method which inserts an Account and returns a PageReference. Which test correctly verifies the controller's behavior?
Select an answer first - 14
In a unit test, what is the purpose of wrapping DML operations between Test.startTest() and Test.stopTest()?
Select an answer first - 15
What is the purpose of the @testSetup annotation in an Apex test class?
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-I” is a trademark of its owner, used for identification only.