Ask Question
27 June, 01:12

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.

+4
Answers (1)
  1. 27 June, 03:58
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers