private void SubstituteGetPricesData(DateTime tsFrom, DateTime tsTo) { _dataProvider.GetPricesData(Arg.Compat.Any <StockDefinition>(), StockDataRange.Daily, 0, Arg.Compat.Any <DateTime>(), Arg.Compat.Any <DateTime>()) .Returns((x) => { _getPricesDataCalls++; return(CreatePricesData(StockDataRange.Daily, 0, tsFrom, tsTo)); }); }
private StockPricesData LoadData(string stockName, StockDataRange dataRange, int intradayInterval, DateTime tsFrom, DateTime tsTo) { StockDefinition stock = _dataProvider.GetStockDefinition(stockName); return(_dataProvider.GetPricesData(stock, dataRange, intradayInterval, tsFrom, tsTo)); }
private StockPricesData OnGetChartData(StockDisplayData displayData, DateTime tsFrom, DateTime tsTo) { displayData.TsFrom = tsFrom; displayData.TsTo = tsTo; return(_dataProvider.GetPricesData(displayData.Stock, displayData.Prices.Range, 0, tsFrom.AddDays(-1), tsTo)); }