Salesforce
PDII · Question #226
What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?
The correct answer is C. ApexPages.StandardController sc = new ApexPages.StandardController(acct). See the full explanation below for the reasoning.
Question
What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?
Options
- AAccountControllerExt extension = new AccountControllerExt(acct);
- BApexPages.StandardController sc = new ApexPages.StandardController(acct.Id);
- CApexPages.StandardController sc = new ApexPages.StandardController(acct);
- DAccountControllerExt extension = new AccountControllerExt(acct.Id);
How the community answered
(58 responses)- A14% (8)
- B7% (4)
- C76% (44)
- D3% (2)
Community Discussion
No community discussion yet for this question.