Frameworks for testing Apex Code

9 marzo, 2017 Salesforce

I would like to share a couple of framworks that are very useful for testing Apex Code. The first one is Apex MockĀ and it will become essential for you when it comes to create test data for your Apex Test classes. The second framework isĀ FinancialForce ApexMocks Framework. This one allows you to decouple complex logic and test it separately. I encourage you to check them out and spend half an hour trying to understand how they work. Once you haveRead More

CreatedDate in test classes

26 enero, 2016 Salesforce

Finally Salesforce fills the gap and allows you to specify the createddate field within test classes. You only have to use the Test.setCreatedDate method introduced with Spring ’16.

Better late than never!