ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 253 - Certified Platform Developer II discussion

Report
Export

A company has many different unit test methods that create Account records as part of their data setup. A new required field was added to the Account and now all of the unit tests fail. What is the optimal way for a developer to fix the issue?

A.
Add the required field to the data setup for all of the unit tests.
Answers
A.
Add the required field to the data setup for all of the unit tests.
B.
Add a before insert trigger on Account to set the value of the required field.
Answers
B.
Add a before insert trigger on Account to set the value of the required field.
C.
Create a TestDataFactory class that serves as the single place to create Accounts for unit tests and set the required field there.
Answers
C.
Create a TestDataFactory class that serves as the single place to create Accounts for unit tests and set the required field there.
D.
Change the required field to be a validation rule that excludes the System Administrator profile.
Answers
D.
Change the required field to be a validation rule that excludes the System Administrator profile.
Suggested answer: C

Explanation:

Topic 3, Exam Pool C

asked 23/09/2024
ASDASDASDA SDASD
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first