How can the develop...
 
Notifications
Clear all

How can the developer generate the code coverage?

1 Posts
1 Users
0 Likes
134 Views
(@siwekphilip)
Noble Member
Joined: 2 years ago
Posts: 730
Topic starter  

An Apex class does not achieve expected code coverage. The testSetup method explicitly calls a method in the Apex class .

How can the developer generate the code coverage?

  • A . Add @testVisible to the method in the class the developer is testing.
  • B . Use system.assert() in testSetup to verify the values are being returned.
  • C . Call the Apex class method from a testMethod instead of the testSetup method.
  • D . Verify the user has permissions passing a user into System.runAs().

Show Answer Hide Answer

Suggested Answer: C

   
Quote

Latest Salesforce PDII Dumps Valid Version

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Share: