Salesforce
CRT-450 · Question #22
A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple subjects. The wizard accepts data from user inputs across multiple…
The correct answer is B. Test.setCurrentPage(pageRef); D. ApexPages.CurrentPage().getParameters().put('input\', 'TestValue'); E. String nextPage -controller.save().getUrl(). See the full explanation below for the reasoning.
Question
A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple subjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL. Which three statements are useful inside the unit test to effectively test the custom controller? Choose 3 answers
Options
- Ainsert pageRef.
- BTest.setCurrentPage(pageRef);
- Cpublic ExtendedController(ApexPages StandardController cntrl) { }
- DApexPages.CurrentPage().getParameters().put('input', 'TestValue');
- EString nextPage -controller.save().getUrl();
How the community answered
(25 responses)- A8% (2)
- B76% (19)
- C16% (4)
Community Discussion
No community discussion yet for this question.