Notifications
Clear all
Topic starter
15/09/2022 5:50 pm
The test method above calls an @future method that increments the Number_of_Times_Viewed__c value. The assertion is failing because the Number_of_Times_Viewed__c equals 0 .
What is the optimal way to fix this?
- A . Change the initialization to acct.Number_Of_Times_Viewed__c = 1.
- B . Change the assertion to System.assertEquals(0, acctAfter.Number_Of_Times_Viewed__c).
- C . Add Test.startTest() before and Test.stopTest() after AuditUtil.incrementViewed.
- D . Add Test.startTest() before and Test.stopTest() after insert acct
Suggested Answer: A