Weekend Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

New Release PDI Developers Questions

Page: 2 / 15
Total 204 questions

Salesforce Certified Platform Developer 1 (SP25) Questions and Answers

Question 5

How should a developer write unit tests for a private method in an Apex class?

Options:

A.

Use the SeeAllData annotation.

B.

Add a test method in the Apex class.

C.

Mark the Apex class as global.

D.

Use the @TestVisible annotation.

Question 6

Where are two locations a developer can look to find information about the status of batch or future methods?

Choose 2 answers

Options:

A.

Developer Console

B.

Apex Jobs

C.

Paused Flow Interviews component

D.

Apex Flex Queue

Question 7

Consider the following code snippet:

apex

CopyEdit

public class with sharing AccountsController {

@AuraEnabled

public List getAllAccounts(){

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 result = AccountsController.getAllAccounts();

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?

Options:

A.

Query the Administrator user into memory and enclose lines 15 and 16 within the System.runAs(user); method.

B.

Query the Standard User into memory and enclose lines 15 and 16 within the System.runAs(); method.

C.

Add @isTest(seeAllData=true); to line 12 and enclose lines 15 and 16 within Test.startTest(); and Test.stopTest();.

D.

Add System.runAs(user); to line 14 and enclose line 15 within Test.startTest(); and Test.stopTest();.

Question 8

What are three capabilities of the tag when loading JavaScript resources in Aura components?

Choose 3 answers

Options:

A.

One-time loading for duplicate scripts

B.

Loading scripts in parallel

C.

Loading Files from Documents

D.

Specifying loading order

E.

Loading externally hosted scripts

Page: 2 / 15
Total 204 questions