示例#1
0
 public TripService(IEventParticipantService eventParticipant,
                    IDonationService donationService,
                    IGroupService groupService,
                    IFormSubmissionService formSubmissionService,
                    MinistryPlatform.Translation.Services.Interfaces.IEventService eventService,
                    IDonorService donorService,
                    IPledgeService pledgeService,
                    ICampaignService campaignService,
                    IPrivateInviteService privateInviteService,
                    ICommunicationService communicationService,
                    IContactService contactService,
                    IContactRelationshipService contactRelationshipService,
                    IConfigurationWrapper configurationWrapper,
                    IPersonService personService,
                    IServeService serveService,
                    IDestinationService destinationService)
 {
     _eventParticipantService = eventParticipant;
     _donationService = donationService;
     _groupService = groupService;
     _formSubmissionService = formSubmissionService;
     _mpEventService = eventService;
     _mpDonorService = donorService;
     _mpPledgeService = pledgeService;
     _campaignService = campaignService;
     _privateInviteService = privateInviteService;
     _communicationService = communicationService;
     _contactService = contactService;
     _contactRelationshipService = contactRelationshipService;
     _configurationWrapper = configurationWrapper;
     _personService = personService;
     _serveService = serveService;
     _destinationService = destinationService;
 }
        public void SetUp()
        {
            const int mockPledgesPageId = 9876;

            _ministryPlatformService = new Mock<IMinistryPlatformService>();
            _authService = new Mock<IAuthenticationService>();
            _configWrapper = new Mock<IConfigurationWrapper>();

            _configWrapper.Setup(m => m.GetEnvironmentVarAsString("API_USER")).Returns("uid");
            _configWrapper.Setup(m => m.GetEnvironmentVarAsString("API_PASSWORD")).Returns("pwd");
            _authService.Setup(m => m.Authenticate(It.IsAny<string>(), It.IsAny<string>())).Returns(new Dictionary<string, object> {{"token", "ABC"}, {"exp", "123"}});
            _configWrapper.Setup(m => m.GetConfigIntValue("Pledges")).Returns(mockPledgesPageId);
            _configWrapper.Setup(mocked => mocked.GetConfigIntValue("MyHouseholdPledges")).Returns(525);

            _fixture = new PledgeService(_ministryPlatformService.Object, _authService.Object, _configWrapper.Object);
        }
示例#3
0
 public DonationService(IMinistryPlatformService ministryPlatformService, IDonorService donorService, ICommunicationService communicationService, IPledgeService pledgeService, IConfigurationWrapper configuration, IAuthenticationService authenticationService, IConfigurationWrapper configurationWrapper)
     : base(authenticationService, configurationWrapper)
 {
     _ministryPlatformService = ministryPlatformService;
     _donorService = donorService;
     _communicationService = communicationService;
     _pledgeService = pledgeService;
     _donationsPageId = configuration.GetConfigIntValue("Donations");
     _donationDistributionPageId = configuration.GetConfigIntValue("Distributions");
     _donorMessageTemplateId = configuration.GetConfigIntValue("DonorMessageTemplateId");
     _distributionPageId = configuration.GetConfigIntValue("Distributions");
     _batchesPageId = configuration.GetConfigIntValue("Batches");
     _depositsPageId = configuration.GetConfigIntValue("Deposits");
     _paymentProcessorErrorsPageId = configuration.GetConfigIntValue("PaymentProcessorEventErrors");
     _tripDistributionsPageView = configuration.GetConfigIntValue("TripDistributionsView");
     _gpExportPageView = configuration.GetConfigIntValue("GPExportView");
     _processingProgramId = configuration.GetConfigIntValue("ProcessingProgramId");
     _scholarshipPaymentTypeId = configuration.GetConfigIntValue("ScholarshipPaymentTypeId");
     _tripDonationMessageTemplateId = configuration.GetConfigIntValue("TripDonationMessageTemplateId");
 }
示例#4
0
        public DonorService(IDonorService mpDonorService, IContactService mpContactService,
            Interfaces.IPaymentService paymentService, IConfigurationWrapper configurationWrapper,
            IAuthenticationService authenticationService, IPledgeService pledgeService)
        {
            _mpDonorService = mpDonorService;
            _mpContactService = mpContactService;
            _paymentService = paymentService;
            _authenticationService = authenticationService;
            _pledgeService = pledgeService;

            _guestGiverDisplayName = configurationWrapper.GetConfigValue("GuestGiverContactDisplayName");

            _statementFrequencyNever = configurationWrapper.GetConfigIntValue("DonorStatementFrequencyNever");
            _statementFrequencyQuarterly = configurationWrapper.GetConfigIntValue("DonorStatementFrequencyQuarterly");
            _statementTypeIndividual = configurationWrapper.GetConfigIntValue("DonorStatementTypeIndividual");
            _statementMethodNone = configurationWrapper.GetConfigIntValue("DonorStatementMethodNone");
            _statementMethodPostalMail = configurationWrapper.GetConfigIntValue("DonorStatementMethodPostalMail");
            _notSiteSpecificCongregation = configurationWrapper.GetConfigIntValue("NotSiteSpecificCongregation");
            _capitalCampaignPledgeTypeId = configurationWrapper.GetConfigIntValue("PledgeCampaignTypeCapitalCampaign");

            _recurringGiftSetupEmailTemplateId = configurationWrapper.GetConfigIntValue("RecurringGiftSetupEmailTemplateId");
            _recurringGiftUpdateEmailTemplateId = configurationWrapper.GetConfigIntValue("RecurringGiftUpdateEmailTemplateId");
            _recurringGiftCancelEmailTemplateId = configurationWrapper.GetConfigIntValue("RecurringGiftCancelEmailTemplateId");
        }