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.

Respuesta :

Limosa

Answer:

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.