Ask Question
5 September, 05:00

If 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 criteria.

A. Create test data in the test method and use seeAllData=true.

B. Query existing data in the test method and use seeAllData=true.

C. Create test data in the test method and use seeAllData=false.

D. Use @testVisible on the relevant property of the controller.

+2
Answers (1)
  1. 5 September, 05:27
    0
    Option C is correct.

    Explanation:

    If the Apex test function tests the following page manager that checks with StageName = ' Closed ' for all the following opportunities. There have been 10,000 current documentation that corresponds to the requirements.

    Well into the test function, generating testing data and using seeAllData = false is the standard policy for accessing information in the experimental system

    Other options are incorrect about the following scenario because they are not relate the following requirements.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “If an Apex test method is testing a Visualforce page's controller, which queries for all Opportunities in Salesforce with StageName = ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers