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); }
public InstantDepositManager(IDepositManager depositManager, IDepositDetailsRepository depositDetailsRepository, ITimestamper timestamper, ILogManager logManager, uint requiredBlockConfirmations) { _depositManager = depositManager; _depositDetailsRepository = depositDetailsRepository; _timestamper = timestamper; _logger = logManager.GetClassLogger(); _requiredBlockConfirmations = requiredBlockConfirmations; }
public DepositsController(IDepositManager depositManager, IPaymentManager paymentManager, IIncludedCollector includedCollector, IMapper mapper, IJsonApiBuilder jsonApiBuilder, ILogger <OffersController> logger) { _depositManager = depositManager; _paymentManager = paymentManager; _includedCollector = includedCollector; _mapper = mapper; _jsonApiBuilder = jsonApiBuilder; _logger = logger; }
private void SetUpSubstitutes() { transactionVerifier = Substitute.For <ITransactionVerifier>(); paymentClaimProcessor = Substitute.For <IPaymentClaimProcessor>(); depositManager = Substitute.For <IDepositManager>(); providerDepositApprovalRepository = Substitute.For <IProviderDepositApprovalRepository>(); gasPriceService = Substitute.For <IGasPriceService>(); wallet = NullWallet.Instance; blockchainBridge = Substitute.For <INdmBlockchainBridge>(); refundPolicy = Substitute.For <IRefundPolicy>(); }
public NdmRpcProviderModule(IProviderService providerService, IReportService reportService, IProviderTransactionsService providerTransactionsService, IProviderGasLimitsService gasLimitsService, IGasPriceService gasPriceService, IProviderThresholdsService providerThresholdsService, IDepositManager depositManager) { _providerService = providerService; _reportService = reportService; _providerTransactionsService = providerTransactionsService; _gasLimitsService = gasLimitsService; _gasPriceService = gasPriceService; _providerThresholdsService = providerThresholdsService; _depositManager = depositManager; }
public ConsumerService(IAccountService accountService, IDataAssetService dataAssetService, IDataRequestService dataRequestService, IDataConsumerService dataConsumerService, IDataStreamService dataStreamService, IDepositManager depositManager, IDepositApprovalService depositApprovalService, IProviderService providerService, IReceiptService receiptService, IRefundService refundService, ISessionService sessionService) { _accountService = accountService; _dataAssetService = dataAssetService; _dataRequestService = dataRequestService; _dataConsumerService = dataConsumerService; _dataStreamService = dataStreamService; _depositManager = depositManager; _depositApprovalService = depositApprovalService; _providerService = providerService; _receiptService = receiptService; _refundService = refundService; _sessionService = sessionService; }
public OrdersController(IOrderManager orderManager, IOfferManager offerManager, IInvoiceManager invoiceManager, ICustomerManager customerManager, IContactManager contactManager, IBuildingManager buildingManager, IDepositManager depositManager, IDepositInvoiceManager depositInvoiceManager, IVatRateManager vatRateManager, IDocumentGenerationManager documentGenerationManager, IIncludedCollector includedCollector, IMapper mapper, IJsonApiBuilder jsonApiBuilder) { _orderManager = orderManager; _customerManager = customerManager; _contactManager = contactManager; _buildingManager = buildingManager; _offerManager = offerManager; _invoiceManager = invoiceManager; _depositManager = depositManager; _depositInvoiceManager = depositInvoiceManager; _vatRateManager = vatRateManager; _documentGenerationManager = documentGenerationManager; _includedCollector = includedCollector; _mapper = mapper; _jsonApiBuilder = jsonApiBuilder; }