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

Which statement is unnecessary inside the unit test for the custom controller? 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 

This question is part of Salesforce Platform Developer 1
Asked by Cmduquer, Last updated: Jan 16, 2020

+ Answer
Request

2 Answers

M. Porter

Here to relax my mind a bit

M. Porter, Senior Executive, Master of Art, San Jose

Answered Jan 25, 2019

The statement that is unnecessary is Public ExtendedController (ApexPages.StandardController cntrl) { } Another possible statement that is not needed in order to complete the task is String nextPage = controller.save().getUrl() Without these statements, it will be possible to create and edit multiple objects without many issues.

Unit tests are important because they can check if the codes that are available are working. If the code is not working properly, the only way to deal with that code is to remove it. It will be pointless to create arguments or to do some justifications with some of the codes that are not working. Either they can be changed to work or they will just be removed.

 

cmduquer

Cmduquer

Answered Oct 26, 2018

Public ExtendedController (ApexPages.StandardController cntrl) { }
String nextPage = controller.save().getUrl();

####
 

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.