예제 #1
0
 public DataPump(IDataPumpProvider dataPumpProvider, IDataFileIterator dataFileIterator,
                 IDataPumpStockDataToDBWriter stockDataToDBWriter, IDataFileLineToStockData lineToStockData,
                 IDataFileDownloader dataFileDownloader, DownloadDirectories downloadDirectories)
 {
     _dataPumpProvider    = dataPumpProvider;
     _dataFileIterator    = dataFileIterator;
     _stockDataToDBWriter = stockDataToDBWriter;
     _lineToStockData     = lineToStockData;
     _dataFileDownloader  = dataFileDownloader;
     _downloadDirectories = downloadDirectories;
 }
예제 #2
0
        public void SetUp()
        {
            _executedQueries.Clear();
            _dataPumpProvider = Substitute.For <IDataPumpProvider>();
            _dataPumpProvider.GetTableName(StockType.Stock, StockDataRange.Daily, 0).Returns("at_dzienne0");
            _dataPumpProvider.GetTableName(StockType.Index, StockDataRange.Daily, 0).Returns("at_dzienne1");
            _dataPumpProvider.ExecuteSQL(Arg.Compat.Do <string>(s => _executedQueries.Add(s)));

            _stockDataToDBWriter = new DataPumpStockDataToDBWriter(_dataPumpProvider, new InsertCommandGenerator(_dataPumpProvider));
            _dataFileIterator    = new DailyDataFileIterator();
            _lineToStockData     = new DailyDataFileLineToStockData();

            TestObj = new MarketOps.DataPump.Bossa.DataPump(_dataPumpProvider, _dataFileIterator, _stockDataToDBWriter, _lineToStockData, _dataFileDownloader, _downloadDirectories);
        }