Salesforce Platform Developer I (legacy) — Question 4
Using the Schema Builder, a developer tries to change the API name of a field that is referenced in an Apex test class.
What is the end result?
Answer options
- A. The API name is not changed and there are no other impacts.
- B. The API name of the field and the reference in the test class is changed.
- C. The API name of the field is changed, and a warning is issued to update the class.
- D. The API name of the field and the reference in the test class is updated.
Correct answer: A
Explanation
The correct answer is A because changing the API name of a field using Schema Builder does not affect the existing references in Apex test classes; thus, the API name remains unchanged. Options B, C, and D are incorrect since they imply that changes would be automatically reflected in the test class, which is not the case.