How can a test class access the private members of another class ?



How can a test class access the private members of another class ?..

Answer / Mintu Kumar

In Salesforce Apex, you cannot directly access private members of another class from a test class. However, you can write unit tests that create instances of the class under test and call its public methods to verify their behavior.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

What happens to detail record when a master record is deleted? What happens to child record when a parent record is deleted?

1 Answers  


What is the self-service portal?

1 Answers  


Do we need a namespace to develop lightning components ? : salesforce lightning component

1 Answers  


What is a permission set?

1 Answers  


What is the difference between role and profile in salesforce ?

1 Answers  


Is there is any option to specify time zone for uploading records in apex data loader? : salesforce Data Management

1 Answers  


What are lightning components?

1 Answers  


What is a governor limit in salesforce?

1 Answers  


What is a sobject type?

1 Answers  


I want to convert vf page to a pdf. How to achieve it?

1 Answers  


Describe a use case when you’d control permissions through each of the following?

1 Answers  


Is it possible to edit the process once it is activated? : salesforce process builder

1 Answers  


Categories