public GLGAFLedgerRecordsCreatorTests()
        {
            _accountDataContext   = GetService <AccountDataContext>();
            _gafPeriodDataContext = GetService <GAFPeriodDataContext>();
            _taxPeriodDataContext = GetService <TaxPeriodDataContext>();
            _branchDataContext    = GetService <BranchDataContext>();
            _finPeriodDataContext = GetService <FinPeriodDataContext>();

            _glgafLedgerRecordsCreator = new GLGAFLedgerRecordsCreator(GAFRepository);

            GAFRepositoryMock.Setup(repo => repo.GetTaxPeriodByKey(_gafPeriodDataContext.GAFPeriod.BranchID, _gafPeriodDataContext.GAFPeriod.TaxAgencyID, _gafPeriodDataContext.GAFPeriod.TaxPeriodID))
            .Returns(_taxPeriodDataContext.TaxPeriod);

            GAFRepositoryMock.Setup(repo => repo.GetFinPeriodsInInterval(_taxPeriodDataContext.TaxPeriod.StartDate, _taxPeriodDataContext.TaxPeriod.EndDate))
            .Returns(_finPeriodDataContext.FinPeriod201503.SingleToArray());

            GAFRepositoryMock.Setup(repo => repo.GetBranchByID(_branchDataContext.Branch.BranchID))
            .Returns(_branchDataContext.Branch);

            GAFRepositoryMock.Setup(repo => repo.FindLastYearNotAdjustmentPeriod(It.IsAny <string>()))
            .Returns(new FinPeriod()
            {
                FinPeriodID = "201512"
            });
        }
 protected InvoiceGAFRecordsCreatorTestsBase()
 {
     VendorDataContext    = GetService <VendorDataContext>();
     TaxPeriodDataContext = GetService <TaxPeriodDataContext>();
     TaxDataBuilder       = GetService <TTaxDataBuilder>();
     LocationDataContext  = GetService <LocationDataContext>();
     ContactDataContext   = GetService <ContactDataContext>();
 }
Esempio n. 3
0
        public APPaymentGAFRecordsCreatorTests()
        {
            _vendorDataContext    = GetService <VendorDataContext>();
            _taxPeriodDataContext = GetService <TaxPeriodDataContext>();
            _locationDataContext  = GetService <LocationDataContext>();

            var purchaseRecordBuilder = new PurchaseRecordBuilderByTaxTranOfAPPayment(GAFRepository,
                                                                                      new PurchaseRecordBuilderByVendorData(GAFRepository),
                                                                                      new GafRecordBuilderByRegister(GAFRepository));

            ApPaymentGAFRecordsCreator = new APPaymentGAFRecordsCreator(GAFRepository, purchaseRecordBuilder);
        }