Created
April 14, 2020 10:05
-
-
Save mzakirhossain/a869f6e06ffc6106dcd4b7658a5aacd4 to your computer and use it in GitHub Desktop.
Test Class for CustNotify and CustNotifyScheduledCron
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 | |
public with sharing class TestCustNotify { | |
@TestSetup | |
static void insertNewOpportunity() { | |
Account objAccount = new Account(Name = 'Test Acc1', BillingCity = 'Test City', BillingState = 'Test State', | |
BillingStreet = 'Test Street', BillingPostalCode = '12345', | |
BillingCountry = 'Test Country', Phone = '123456'); | |
insert objAccount; | |
Opportunity objOpp = new Opportunity(Name = 'Test Opp', AccountId = objAccount.Id, StageName = 'Verbal Confirmation', CloseDate = Date.today()); | |
insert objOpp; | |
} | |
@IsTest | |
static void methodTest() { | |
Test.startTest(); | |
SchedulableContext sc = null; | |
try { | |
CustNotifyScheduledCron.execute(sc); | |
}catch(Exception e) { | |
} | |
Test.stopTest(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment