Which statements is unnecessary inside the unit test for thecustom - ProProfs Discuss
Topics
Products
Follow Us:

Which statements is unnecessary inside the unit test for thecustom controller? A developer has a single custom controller class that works with a Visualforce to support creating and editing multiple Objects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL.



A. ApexPages.currentPage().getParameter.put(‘input’,’Testvalue’)
B. String nextPage = controller.save().getUrl();
C. Public ExtendedController(ApexPages.StandardController cntrl) {}
D. Test.setCurrentPage(PageRef)

This question is part of Exam ng Pabebe Girls
Asked by Catherine halcombe, Last updated: Feb 21, 2020

+ Answer
Request

6 Answers

L. Brett

Ask me anything!

L. Brett, Sales Manager, MBA, Detroit

Answered Mar 28, 2019

The correct answer to this question is B. The statement String nextPage = controller.save().getUrl(); is unnecessary inside the unit test for the custom controller. Like all Apex scripts, controller extensions and custom controllers should be covered by unit tests.

These unit tests do not use arguments and do not commit any data to the database, but are simply class methods used for the purpose of verifying whether a snippet of code is working as it should. This is important to be sure the functionality of a page is set up and is working as planned. This is a useful feature of computer programs.

 

pasha

Pasha

Answered Feb 01, 2017

Public extendedcontroller(apexpages.standardcontroller cntrl) {}
 

michal

Michal

Answered Jan 19, 2017

String nextPage = controller.save().getUrl();
 

nocovi

Nocovi

Answered Dec 04, 2016

Public Extended Controller (Apex Pages.Standard Controller cntrl).

Thanks

Novoci

 

robi.android

Public ExtendedController(ApexPages.StandardController cntrl) {}
 

John Smith

John Smith

Answered Oct 26, 2016

ApexPages.currentPage().getParameter.put(‘input’,’Testvalue’)
1
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.