
SalesforceCertified Platform Developer I
Domain 5Objective 2
Describe How to Write Unit Tests for Triggers, Controllers, and Classes. PLATFORM-DEVELOPER-I Practice Questions (Page 1)
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 1–5
- 1
Which assertion would a developer use to verify that a method returns exactly the expected integer value?
Select an answer first - 2
A developer is writing a unit test for a trigger that sets the `Description` field on an Account to 'Processed' after insert. Which assertion correctly verifies the trigger's behavior?
Select an answer first - 3
A developer is writing a test class for a trigger that runs on Account and creates related Opportunities. The test class has multiple test methods that each need the same Account and Opportunity setup. Which approach is most efficient and reliable?
Select an answer first - 4
A developer created a custom controller for a Visualforce page that has a method `getAccounts()` returning a list of Account records. The developer needs to write a unit test for this controller. Which test approach is correct?
Select an answer first - 5
Why is it important to test a trigger with a list of multiple records (bulk scenario)?
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.