/// <summary>constructor</summary>
 public ReceiptFileImportProcessor(
     ICompanyProcessor companyProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     IImporterSettingProcessor importerSettingProcessor,
     IImporterSettingDetailProcessor importerSettingDetailProcessor,
     IGeneralSettingProcessor generalSettingProcessor,
     ICurrencyProcessor currencyProcessor,
     ICategoryProcessor categoryProcessor,
     ISectionProcessor sectionProcessor,
     ICustomerProcessor customerProcessor,
     IJuridicalPersonalityProcessor juridicalPersonalityProcessor,
     ICollationSettingProcessor collationSettingProcessor,
     IColumnNameSettingProcessor columnNameSettingProcessor,
     IImportDataProcessor importDataProcessor,
     IReceiptProcessor receiptProcessor
     )
 {
     this.companyProcessor               = companyProcessor;
     this.applicationControlProcessor    = applicationControlProcessor;
     this.importerSettingProcessor       = importerSettingProcessor;
     this.importerSettingDetailProcessor = importerSettingDetailProcessor;
     this.generalSettingProcessor        = generalSettingProcessor;
     this.currencyProcessor              = currencyProcessor;
     this.categoryProcessor              = categoryProcessor;
     this.sectionProcessor               = sectionProcessor;
     this.customerProcessor              = customerProcessor;
     this.juridicalPersonalityProcessor  = juridicalPersonalityProcessor;
     this.collationSettingProcessor      = collationSettingProcessor;
     this.columnNameSettingProcessor     = columnNameSettingProcessor;
     this.importDataProcessor            = importDataProcessor;
     this.receiptProcessor               = receiptProcessor;
     this.serializer = MessagePackSerializer.Get <ReceiptInput>(new SerializationContext {
         DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native
     });
 }
示例#2
0
 /// <summary>constructor</summary>
 public ReceiptController(
     IReceiptProcessor receiptProcessor,
     IReceiptApportionProcessor receiptApportionProcessor,
     IReceiptSearchProcessor receiptSearchProcessor,
     IReceiptHeaderProcessor receiptHeaderProcessor,
     IReceiptExcludeProcessor receiptExcludeProcessor,
     IReceiptMemoProcessor receiptMemoProcessor,
     IReceiptJournalizingProcessor receiptJournalizingProcessor,
     IReceiptSectionTransferProcessor receiptSectionTransferProcessor,
     IAdvanceReceivedProcessor advanceReceivedProcessor,
     IAdvanceReceivedSplitProcessor advanceReceivedSplitProcessor,
     IReceiptFileImportProcessor receiptFileImportProcessor
     )
 {
     this.receiptHeaderProcessor          = receiptHeaderProcessor;
     this.receiptProcessor                = receiptProcessor;
     this.receiptApportionProcessor       = receiptApportionProcessor;
     this.receiptSearchProcessor          = receiptSearchProcessor;
     this.receiptExcludeProcessor         = receiptExcludeProcessor;
     this.receiptMemoProcessor            = receiptMemoProcessor;
     this.receiptJournalizingProcessor    = receiptJournalizingProcessor;
     this.receiptSectionTransferProcessor = receiptSectionTransferProcessor;
     this.advanceReceivedProcessor        = advanceReceivedProcessor;
     this.advanceReceivedSplitProcessor   = advanceReceivedSplitProcessor;
     this.receiptFileImportProcessor      = receiptFileImportProcessor;
 }
示例#3
0
        public void Setup()
        {
            _depositNodesHandlerFactory = Substitute.For <IDepositNodesHandlerFactory>();
            _sessionManager             = Substitute.For <ISessionManager>();
            _receiptsPolicies           = Substitute.For <IReceiptsPolicies>();
            _receiptProcessor           = Substitute.For <IReceiptProcessor>();
            _paymentClaimProcessor      = Substitute.For <IPaymentClaimProcessor>();
            _consumerRepository         = Substitute.For <IConsumerRepository>();
            _paymentClaimRepository     = Substitute.For <IPaymentClaimRepository>();
            _sessionRepository          = Substitute.For <IProviderSessionRepository>();
            _sessionRepository.BrowseAsync(Arg.Any <GetProviderSessions>()).Returns(PagedResult <ProviderSession> .Empty);
            _receiptRepository = Substitute.For <IReceiptRepository>();
            var unixTime = UnixTime.FromSeconds(100);

            _timestamper = Substitute.For <ITimestamper>();
            _timestamper.UnixTime.Returns(unixTime);
            _gasPriceService     = Substitute.For <IGasPriceService>();
            _logManager          = Substitute.For <ILogManager>();
            _wallet              = Substitute.For <IWallet>();
            _address             = Address.Zero;
            _consumer            = Address.Zero;
            _depositNodesHandler = new InMemoryDepositNodesHandler(Keccak.Zero, _consumer, DataAssetUnitType.Unit, 0,
                                                                   100, 0,
                                                                   0, 0, 0, 0, 0, 0, null, null, 0);
            _depositNodesHandlerFactory.CreateInMemory(Arg.Any <Keccak>(), _consumer, Arg.Any <DataAssetUnitType>(),
                                                       Arg.Any <uint>(), Arg.Any <uint>(), Arg.Any <UInt256>(), Arg.Any <uint>(), Arg.Any <uint>(), Arg.Any <uint>(),
                                                       Arg.Any <uint>(), Arg.Any <uint>(), Arg.Any <uint>(), Arg.Any <PaymentClaim>(),
                                                       Arg.Any <IEnumerable <DataDeliveryReceiptDetails> >(), Arg.Any <uint>()).Returns(_depositNodesHandler);
            _depositManager = new DepositManager(_depositNodesHandlerFactory, _sessionManager, _receiptsPolicies,
                                                 _wallet, _address, _receiptProcessor, _paymentClaimProcessor, _consumerRepository,
                                                 _paymentClaimRepository, _receiptRepository, _sessionRepository, _timestamper, _gasPriceService,
                                                 _logManager);
        }
示例#4
0
 public ReceiptService(IAuthorizationProcessor authorizationProcessor,
                       IReceiptProcessor receiptProcessor,
                       IReceiptApportionProcessor receiptApportionProcessor,
                       IReceiptSearchProcessor receiptSearchProcessor,
                       IReceiptHeaderProcessor receiptHeaderProcessor,
                       IReceiptExcludeProcessor receiptExcludeProcessor,
                       IReceiptMemoProcessor receiptMemoProcessor,
                       IReceiptJournalizingProcessor receiptJournalizingProcessor,
                       IReceiptSectionTransferProcessor receiptSectionTransferProcessor,
                       IAdvanceReceivedProcessor advanceReceivedProcessor,
                       IAdvanceReceivedSplitProcessor advanceReceivedSplitProcessor,
                       ILogManager logManager)
 {
     this.authorizationProcessor          = authorizationProcessor;
     this.receiptHeaderProcessor          = receiptHeaderProcessor;
     this.receiptProcessor                = receiptProcessor;
     this.receiptApportionProcessor       = receiptApportionProcessor;
     this.receiptSearchProcessor          = receiptSearchProcessor;
     this.receiptExcludeProcessor         = receiptExcludeProcessor;
     this.receiptMemoProcessor            = receiptMemoProcessor;
     this.receiptJournalizingProcessor    = receiptJournalizingProcessor;
     this.receiptSectionTransferProcessor = receiptSectionTransferProcessor;
     this.advanceReceivedProcessor        = advanceReceivedProcessor;
     this.advanceReceivedSplitProcessor   = advanceReceivedSplitProcessor;
     logger = logManager.GetLogger(typeof(ReceiptService));
 }
示例#5
0
 public DepositManager(IDepositNodesHandlerFactory depositNodesHandlerFactory, ISessionManager sessionManager,
                       IReceiptsPolicies receiptsPolicies, IWallet wallet, Address providerAddress,
                       IReceiptProcessor receiptProcessor, IPaymentClaimProcessor paymentClaimProcessor,
                       IConsumerRepository consumerRepository, IPaymentClaimRepository paymentClaimRepository,
                       IReceiptRepository receiptRepository, IProviderSessionRepository sessionRepository,
                       ITimestamper timestamper, IGasPriceService gasPriceService, ILogManager logManager)
 {
     _depositNodesHandlerFactory = depositNodesHandlerFactory;
     _sessionManager             = sessionManager;
     _receiptsPolicies           = receiptsPolicies;
     _wallet                  = wallet;
     _providerAddress         = providerAddress;
     _receiptProcessor        = receiptProcessor;
     _paymentClaimProcessor   = paymentClaimProcessor;
     _consumerRepository      = consumerRepository;
     _paymentClaimRepository  = paymentClaimRepository;
     _receiptRepository       = receiptRepository;
     _sessionRepository       = sessionRepository;
     _timestamper             = timestamper;
     _gasPriceService         = gasPriceService;
     _logger                  = logManager.GetClassLogger();
     _wallet.AccountLocked   += OnAccountLocked;
     _wallet.AccountUnlocked += OnAccountUnlocked;
     _accountLocked           = !_wallet.IsUnlocked(_providerAddress);
 }
        public BusinessLogic_Documents()
        {
            container = DI_Container.Config();

            receiptProcessor = container.Resolve <IReceiptProcessor>();
            invoiceProcessor = container.Resolve <IInvoiceProcessor>();
            vendor           = container.Resolve <IVendor>();
            buyer            = container.Resolve <IBuyer>();
            invoice          = container.Resolve <IInvoice>();
        }
示例#7
0
 public void SetUp()
 {
     _sessionRepository = Substitute.For <IProviderSessionRepository>();
     _encoder           = Substitute.For <IAbiEncoder>();
     _signer            = Substitute.For <IEcdsa>();
     _peer      = Substitute.For <INdmProviderPeer>();
     _publicKey = new PublicKey(new byte[64]);
     _session   = new ProviderSession(Keccak.Zero, Keccak.Zero, Keccak.Zero, _publicKey.Address,
                                      _publicKey, TestItem.AddressB, TestItem.PublicKeyB, 0, 0);
     _session.SetDataAvailability(DataAvailability.Available);
     _session.Start(0);
     _processor = new ReceiptProcessor(_sessionRepository, _encoder, _signer, LimboLogs.Instance);
 }