Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
Salesforce logo

SalesforceCertified Platform Developer I

Domain 5Objective 2

Describe How to Write Unit Tests for Triggers, Controllers, and Classes. PLATFORM-DEVELOPER-I Practice Questions (Page 2)

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 6–10

  1. 6foundation · easy

    How can a unit test verify that a trigger correctly handles the 'after insert' context?

    Select an answer first
  2. 7foundation · easy

    A developer is writing a unit test for a standard controller extension. Which constructor parameter is required to instantiate the extension?

    Select an answer first
  3. 8application · medium

    A developer wrote a class `AccountHelper` with a method `getAccountNames(List<Account> accounts)` that returns a list of account names. The developer is writing a unit test for this method. Which test method correctly verifies the method's behavior?

    Select an answer first
  4. 9foundation · easy

    A developer writes a unit test for a trigger that updates related records when an Account is inserted. Which sequence of operations must the test method perform to properly exercise the trigger?

    Select an answer first
  5. 10application · medium

    A developer is writing a unit test for a trigger that sends an HTTP callout when an Account is inserted. The trigger uses a named credential for authentication. What must the developer do to test the callout?

    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.