Given the code below, what can be done so that recordCount can be accessed by a test class, but not by a non-test class?

QuestionsCategory: CRT-450Given the code below, what can be done so that recordCount can be accessed by a test class, but not by a non-test class?
Admin Staff asked 4 months ago
Given the code below, what can be done so that recordCount can be accessed by a test class, but not by a non-test class?
 Image

A. Change recordCount from private to public.

B. Add the SeeAllData annotation to the test class.

C. Add the TestVisible annotation to recordCount.

D. Add the TestVisible annotation to the MyController class.








 

Suggested Answer: C

Community Answer: C



This question is in CRT-450 Salesforce Certified Platform Developer I Exam
For getting Salesforce Certified Platform Developer I











Disclaimers:
The website is not related to, affiliated with, endorsed or authorized by Salesforce. 
Trademarks, certification & product names are used for reference only and belong to Salesforce.
The website does not contain actual questions and answers from Salesforce's Certification Exams.

Recommended

Welcome Back!

Login to your account below

Create New Account!

Fill the forms below to register

Retrieve your password

Please enter your username or email address to reset your password.