nerdexam
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)
  • A
    11% (6)
  • B
    4% (2)
  • C
    82% (45)
  • D
    4% (2)

Community Discussion

No community discussion yet for this question.

Full PDII Practice