function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MubarakMubarak 

Private constructor in test class

Hi all,

How to include private constructor in test class for getting better code coverage.

Thanks

 
AmrenderAmrender
Hi Mubarak

Use @TestVisible annotation to make your private constructor visible in test class.

@TestVisible YOUR_PRIVATE_CONSTRUCTOR() {}

Please mark this as best answer if it solve your problem.

Regards
Amrender