Created
July 1, 2019 13:44
-
-
Save lfreeland/cc51589499ce913d3acc2a3c3463f3bb to your computer and use it in GitHub Desktop.
OCRService Test Class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@isTest | |
public class OCRServiceTest { | |
@isTest | |
static void runOCRRollupsTest() { | |
Test.enableChangeDataCapture(); | |
Account acct = new Account(Name = 'Metillium Inc'); | |
insert acct; | |
Contact c1 = new Contact( | |
AccountId = acct.Id, | |
LastName = 'Test 1' | |
); | |
insert c1; | |
Opportunity opp = new Opportunity( | |
AccountId = acct.Id, | |
Name = 'Deal 1', | |
Stagename = 'Prospecting', | |
CloseDate = Date.Today().addMonths(3) | |
); | |
insert opp; | |
OpportunityContactRole ocr = new OpportunityContactRole( | |
OpportunityId = opp.Id, | |
ContactId = c1.Id | |
); | |
insert ocr; | |
// Fires the OpportunityContactRoleChangeEvent Trigger | |
Test.getEventBus().deliver(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment