This file contains hidden or 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 | |
private class TestDeleteRestrictInvoice { | |
// Invoice generator, with or without a Line Item | |
static Invoice__c createNewInvoice(Boolean withLineItem) { | |
// Create test Invoice and insert it into the database | |
Invoice__c invoice = new Invoice__c(); | |
insert invoice; | |
// The following is needed if you are following the tutorial |
This file contains hidden or 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 | |
private class TestDeleteRestrictInvoice { | |
// Invoice generator, with or without a Line Item | |
static Invoice__c createNewInvoice(Boolean withLineItem) { | |
// Create test Invoice and insert it into the database | |
Invoice__c invoice = new Invoice__c(); | |
insert invoice; | |
// Create test Line Item and insert it into the database, if withLineItem == true |