Question: 1
A developer created a Visualforce page that has a custom controller that navigates to an external website after the' command button is pressed. What is the recommended way to test this functionality?
Question: 2
An Apex test method is testing a Visualforce page's controller, which queries for all Opportunities in Salesforce with StageName = 'Closed'. There are 10,000 existing records that match the criteri
a. What is the best practice for accessing data in the test method?
Question: 3
In an Apex custom controller, how should a developer ensure that the current user has the relevant create and update' permissions for a particular object type?
Question: 4
What is the output of the following code snippet? 1 Contact con = new Contact( LastName = 'JOHNSON', LeadSource = 'Web') 2 3 Savepoint sp = Database.setSavepoint(); 4 insert con; 5 Database.rollback(sp); 6 7 con.LeadSource = 'Email' 8 insert con;
Question: 5
To reduce the amount of time needed to write test coverage, a developer wants to use a spreadsheet uploaded as a Static Resource to supply test data in a test method. What code can the developer use to accomplish this?