Salesforce Fact #99 | Constructor code coverage

While writing test classes, if we need to get the coverage for the constructor of the apex class, we need to instantiate the class using new keyword in the test class, otherwise it won't cover the constructor.

Attached are the screenshots.

 

 

 


 

Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow