예제 #1
0
 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));
     });
 }
예제 #2
0
        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));
        }
예제 #3
0
 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));
 }