Salesforce
PDII · Question #228
How should a developer verify that a specific Account record is being tested in a test class for a Visualforce controller?
The correct answer is C. Insert the Account in the test class, instantiate the page reference in the test class, then use. See the full explanation below for the reasoning.
Question
How should a developer verify that a specific Account record is being tested in a test class for a Visualforce controller?
Options
- AInsert the Account into Salesforce, instantiate the page reference in the test class, then use
- BInstantiate the page reference in the test class, insert the Account in the test class, then use
- CInsert the Account in the test class, instantiate the page reference in the test class, then use
- DInstantiate the page reference in the test class, insert the Account in the test class, then use
How the community answered
(55 responses)- A11% (6)
- B4% (2)
- C82% (45)
- D4% (2)
Community Discussion
No community discussion yet for this question.