How should a developer prevent a recursive trigger?
Answer(s): D
Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose two.)
Answer(s): B,C
The @testSetup annotation is used to create a common set of records that can be used across all test methods in a test class. The primary benefit of using this annotation is to reduce the amount of redundant setup code needed in each individual test method. The @testSetup method is executed once per test class before any test methods are executed. The created data is available to all test methods in the class, but it cannot be updated by individual test methods.Option A is incorrect because the @testSetup annotation can be used regardless of the @isTest(SeeAllData=True) annotation.Option D is incorrect because the @testSetup method is only executed once per test class, not before each individual test method.
A developer wrote a unit test to confirm that a custom exception works properly in a custom controller, but the test failed due to an exception being thrown.Which step should the developer take to resolve the issue and properly test the exception?
Answer(s): A
A developer writes the following code:What is the result of the debug statement?
Answer(s): C
Post your Comments and Discuss Salesforce PDI exam with other Community members:
TestPD1 Commented on August 10, 2023 Question 18 : Response isn't A ? EUROPEAN UNION
TestPD1 Commented on August 10, 2023 question 18 : response isnt a ? EUROPEAN UNION
TestPD1 Commented on August 10, 2023 Question 17 : Responses aren't B and C ? EUROPEAN UNION
TestPD1 Commented on August 10, 2023 question 17 : responses arent b and c ? EUROPEAN UNION
Amruta Commented on July 30, 2023 Q. 87 has wrong answer. correct answer is static resorces. UNITED STATES
Thomas Commented on March 26, 2022 it was very good, thank you BRAZIL
We’re offering these study questions to support your success. The least you can do? Drop a useful comment about each question. Help others. Build the community.