public ReferralEmails( IReferralEmailService referralEmailService, IRepository <FunctionLog> functionLogRepository) { _referralEmailService = referralEmailService; _functionLogRepository = functionLogRepository; }
public When_SendProviderReferralEmails_Function_Queue_Trigger_Fires() { _referralEmailService = Substitute.For <IReferralEmailService>(); _functionLogRepository = Substitute.For <IRepository <FunctionLog> >(); var data = new SendProviderReferralEmail { OpportunityId = 1, ItemIds = new List <int> { 101 }, BackgroundProcessHistoryId = 10 }; var providerQuarterlyUpdateEmailFunctions = new Functions.ReferralEmails(_referralEmailService, _functionLogRepository); providerQuarterlyUpdateEmailFunctions.SendProviderReferralEmailsAsync( data, new ExecutionContext(), new NullLogger <Functions.ReferralEmails>() ).GetAwaiter().GetResult(); }
/// <summary> /// Initializes a new instance of the <see cref="ReferralEmailRuleEngine"/> class. /// </summary> /// <param name="referralEmail">The referral email.</param> public ReferralEmailRuleEngine(IReferralEmailService referralEmail) { this.referralEmail = referralEmail; }