Salesforce Certified Platform Developer II (Plat-Dev-301) Exam - Topic 5 Question 73 Discussion
Consider the following code snippet:As part of the deployment cycle, a developer creates the following test class:When the test class runs, the assertion fails.Which charge should the developer implement in the Apex test method to ensure the test method execute successfully?
B) Add System.runAs (User) to line 14 and enclose line 14 within Test.startTest() and Test.stoptest ().
A) Query the Standard User into memory and enclose lines 14 and 15 within the System.runAs (user) method.
C) Query the Administrator user into memory and enclose lines 14 and 15 within the System,runAs (user)
method.
D) Add @IsTest(seeAllData=True) to line 12 and enclose lines 14 and 15 within Test.startTest () and test.stopTest()
Sarina
7 months agoDonte
7 months agoTaryn
7 months agoBronwyn
7 months agoLashawn
8 months agoDouglass
8 months agoNana
8 months agoCelestina
8 months agoJosephine
8 months agoAracelis
8 months agoErnest
9 months agoSimona
9 months agoAlayna
9 months ago