I want to access Private Method or Variable in Test class.??
1 Answer
Read about and use the @TestVisble annotation.
From the documentation:
Use the TestVisible annotation to allow test methods to access private or protected members of another class outside the test class. These members include methods, member variables, and inner classes. This annotation enables a more permissive access level for running tests only. This annotation doesn’t change the visibility of members if accessed by non-test classes.