public void InitializatFixture()
 {
     Configurations.BootStrap();
     bmc     = ObjectFactory.GetInstance <BusinessManagerContainer>();
     Session = ObjectFactory.GetInstance <ISession>();
     CommitmentBusinessManager    = bmc.Get <CommitmentBusinessManager>();
     DonorBusinessManager         = bmc.Get <DonorBusinessManager>();
     DonationCaseBusinessManager  = bmc.Get <DonationCaseBusinessManager>();
     PaymentBusinessManager       = bmc.Get <PaymentBusinessManager>();
     PaymentPeriodBusinessManager = bmc.Get <PaymentPeriodBusinessManager>();
     FillPaymentPeriods(2014); PaymentPeriodList = Session.Query <Entities.PaymentPeriod>().ToArray();
 }
Beispiel #2
0
 public void CreateDonors()
 {
     for (var d = 0; d < 2; ++d)
     {
         var donorMoq = MockDonor();
         var donorId  = DonorBusinessManager.Add(donorMoq.Object);
         for (var dc = 0; dc < 1; dc++)
         {
             var donationCaseMock = MockDonationCase();
             var donationCaseId   = DonationCaseBusinessManager.Add(donationCaseMock.Object);
             var commitmentMock   = MockCommitment(donorId, donationCaseId);
             var commitmentId     = CommitmentBusinessManager.Add(commitmentMock.Object);
             for (var payment = 0; payment < 3; payment++)
             {
                 var paymentMock = MockPayment(commitmentId, PaymentPeriodList[payment].Id, (int)commitmentMock.Object.Amount);
                 PaymentBusinessManager.Register(paymentMock.Object);
             }
         }
     }
 }