Exam Name: | Salesforce Certified Platform Developer 1 (SP25) | ||
Exam Code: | PDI Dumps | ||
Vendor: | Salesforce | Certification: | Developers |
Questions: | 204 Q&A's | Shared By: | bernie |
Consider the following code snippet:
apex
CopyEdit
public class with sharing AccountsController {
@AuraEnabled
public List
return [SELECT Id, Name, Industry FROM Account];
}
}
Apex Test Class Snippet:
apex
CopyEdit
@isTest
private class with sharing AccountsController_Test {
@testSetup
private static void makeData(){
User user1 = [SELECT Id FROM User WHERE Profile.Name = 'System Administrator' AND isActive = true LIMIT 1];
User user2 = [SELECT Id FROM User WHERE Profile.Name = 'Standard User' AND UserName = 'test@test.com' AND isActive = true LIMIT 1];
TestUtils.insertAccounts(10, user1.Id);
TestUtils.insertAccounts(20, user2.Id);
}
@isTest
private static void getAllAccounts_StandardUser_Test(){
List
System.assertEquals(20, result.size());
}
}
When the test class runs, the assertion fails.
Which change should the developer implement in the Apex test method to ensure the test method executes successfully?
A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org.
Which tool should the developer use to troubleshoot query performance?
What should a developer do to check the code coverage of a class after running all tests?
What are two benefits of using External IDs?
Choose 2 answers