Activity Forums Salesforce® Discussions How do you call private methods in Test class?

  • Aditya

    Member
    September 5, 2020 at 8:00 am

    <div aria-level="3" role="heading">From this article: Testing Private Methods with JUnit and SuiteRunner (Bill Venners), you basically have 4 options:
    <div>

    1. Don't test private methods.
    2. Give the methods package access.
    3. Use a nested test class.
    4. Use reflection.

    </div></div>

  • Ayush

    Member
    September 7, 2020 at 11:44 am

    With The Help of @TestVisible.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos