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 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

  1. 11foundation · easy

    When testing a controller's action method that returns a PageReference, what should the test assert?

    Select an answer first
  2. 12foundation · easy

    Which DML operation would a unit test perform to exercise a trigger that fires on the 'before update' event?

    Select an answer first
  3. 13application · medium

    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
  4. 14foundation · easy

    In a unit test, what is the purpose of wrapping DML operations between Test.startTest() and Test.stopTest()?

    Select an answer first
  5. 15foundation · easy

    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.