+ Start a Discussion

How to modify LastModifiedDate in test method?



I have a class that search for cases where LastModifiedDate is 3 business days in the past. All cases found are modified and then updated accordingly.


My question is this: How do I create a test case in my test method where LastModifiedDate is e.g. 5 business days ago to ensure proper code coverage (nd verify the outcome?




Søren Nødskov Hansen


I don't know whether this will be of help in your case or not.  They seem to only let you have it active for limted periods of time.