Salesforce: tests for email invocations

Salesforce: tests for email invocations
private class TestClass {

static testMethod void testSendEmailsMethod(){

Integer emailsCountSentBefore = Limits.getEmailInvocations();
System.assertNotEquals(1, Limits.getEmailInvocations() – emailsCountSentBefore, ‘Should be increased by 1 or other value how many emails have been sent’);


This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s