public void Setup()
        {
            _orderBookManager                = new();
            _settingsMock                    = new();
            _walletManager                   = new();
            _tradingService                  = new();
            _instrumentDictionaryMock        = new();
            _assetDictionary                 = new AssetsDictionaryMock();
            _externalBalanceCacheManagerMock = new ExternalBalanceCacheManagerMock();

            _loggerFactory =
                LoggerFactory.Create(builder =>
                                     builder.AddSimpleConsole(options =>
            {
                options.IncludeScopes   = true;
                options.SingleLine      = true;
                options.TimestampFormat = "hh:mm:ss ";
            }));

            _engine = new AggregateLiquidityProvider(
                _loggerFactory.CreateLogger <AggregateLiquidityProvider>(),
                new OrderIdGenerator(),
                _orderBookManager,
                _settingsMock,
                _walletManager,
                _tradingService,
                _instrumentDictionaryMock,
                _assetDictionary,
                _externalBalanceCacheManagerMock
                );
        }
Example #2
0
        public void Setup()
        {
            _loggerFactory =
                LoggerFactory.Create(builder =>
                                     builder.AddSimpleConsole(options =>
            {
                options.IncludeScopes   = true;
                options.SingleLine      = true;
                options.TimestampFormat = "hh:mm:ss ";
            }));
            _logger       = _loggerFactory.CreateLogger <QuoteService>();
            _assetsClient = new AssetsDictionaryMock();
            _spotInstrumentDictionaryClient     = new SpotInstrumentDictionaryMock();
            _liquidityConverterSettingsAccessor = new LiquidityConverterSettingsAccessorMock();
            _spotInstrumentFeesClient           = new SpotInstrumentFeesClientMock();
            _orderBookService        = new OrderBookServiceMock();
            _dbContextOptionsBuilder = new DbContextOptionsBuilderMock();
            _quotesContextProvider   = new QuotesContextProviderMock();
            _cashServiceClient       = new CashServiceClientMock();
            _tradingServiceClient    = new TradingServiceClientMock();
            ConvertQuoteStorageMock  = new ConvertQuoteStorageMock();
            _instrumentEngine        = new InstrumentEngine(_logger,
                                                            _assetsClient,
                                                            _spotInstrumentDictionaryClient,
                                                            _liquidityConverterSettingsAccessor,
                                                            _spotInstrumentFeesClient,
                                                            _orderBookService);

            Service = new QuoteService(_logger,
                                       _assetsClient,
                                       _spotInstrumentDictionaryClient,
                                       _liquidityConverterSettingsAccessor,
                                       _spotInstrumentFeesClient,
                                       _orderBookService,
                                       _quotesContextProvider,
                                       _cashServiceClient,
                                       _tradingServiceClient,
                                       ConvertQuoteStorageMock,
                                       _instrumentEngine);

            GenerateAssetsClient();
            GenerateSpotInstrumentDictionaryClient();
            GenerateLiquidityConverterSettingsAccessor();
            GenerateSpotInstrumentFeesClient();
            GenerateOrderBookService();
        }