// TODO: This is a lot of injected dependencies... public WebhookHandlerService(IPaymentHandlerSubscription paymentHandlerSubscription, IPaymentHandlerCustomerService paymentHandlerCustomerService, IPaymentHandlerInvoice paymentHandlerInvoice, IPaymentHandlerEventService paymentHandlerEvent, INewMemberService newMemberService, IMemberAddBillingActivityService memberAddBillingActivityService, IMemberSubscriptionRenewalService memberSubscriptionRenewalService, IMemberCancellationService memberCancellationService, IMemberSubscriptionEndedAdminEmailService memberSubscriptionEndedAdminEmailService, IUserLookupService userLookupService, IRepository <Member> repository, AdminUpdatesWebhook webhook, IAppLogger <WebhookHandlerService> logger) { _paymentHandlerSubscription = paymentHandlerSubscription; _paymentHandlerCustomerService = paymentHandlerCustomerService; _paymentHandlerInvoice = paymentHandlerInvoice; _paymentHandlerEventService = paymentHandlerEvent; _newMemberService = newMemberService; _memberAddBillingActivityService = memberAddBillingActivityService; _memberSubscriptionRenewalService = memberSubscriptionRenewalService; _memberCancellationService = memberCancellationService; _memberSubscriptionEndedAdminEmailService = memberSubscriptionEndedAdminEmailService; _userLookupService = userLookupService; _repository = repository; _webhook = webhook; _logger = logger; }
public MemberSubscriptionCancellationServiceTest() { _userRoleMembershipService = new Mock <IUserRoleMembershipService>(); _emailService = new Mock <IEmailService>(); _userLookup = new Mock <IUserLookupService>(); _memberLookup = new Mock <IMemberLookupService>(); _memberRepository = new Mock <IRepository <Member> >(); _subscriptionPeriodCalculationsService = new Mock <IMemberSubscriptionPeriodCalculationsService>(); _memberCancellationService = new MemberSubscriptionCancellationService(_userRoleMembershipService.Object, _emailService.Object, _userLookup.Object, _memberLookup.Object, _memberRepository.Object, _subscriptionPeriodCalculationsService.Object); }