Labour Day Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

Developers CRT-450 Salesforce Study Notes

Page: 2 / 18
Total 235 questions

Salesforce Certified Platform Developer I (SP23) Questions and Answers

Question 5

Which two statements are true about using the @testSetup annotation in an Apex test class?

Choose 2 answers

Options:

A.

Records created in the test setup method cannot be updated in individual test methods.

B.

Qo The @testSetup annotation is not supported when the GisTest(SeeAllData=True) annotation is used.

C.

Test data is inserted once for all test methods in a class.

D.

A method defined with the @testSetup annotation executes once for each test method in the test class and counts towards system limits.

Question 6

What are three ways for a developer to execute tests in an org? Choose 3.

Options:

A.

Bulk API

B.

Tooling API

C.

Setup Menu

D.

Salesforce DX

E.

Metadata API.

Question 7

While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors.

Why did the method fail in the sandbox test framework but succeed in the Developer Console?

Options:

A.

The test method has a syntax error In the code.

B.

The test method does not use System. rurAs to execute as a specific user.

C.

The test method Is calling an future method.

D.

The test method relies on existing data in the sandbox.

Question 8

A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces. public interface Sortable { void sort(); } public interface Drawable { void draw(); } Which is the correct implementation?

Options:

A.

Public class DrawList implements Sortable, Implements Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

]

B.

Public class DrawList extends Sortable, Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

}

C.

Public class DrawList implements Sortable, Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

}

D.

Public class DrawList extends Sortable, extends Sortable, extends Drawable {

public void sort() { /*implementation*/ }

public void draw() { /* implementation */}

Page: 2 / 18
Total 235 questions