public void SetUp()
 {
     _dataPumpProvider = Substitute.For <IDataPumpProvider>();
     _dataPumpProvider.GetTableName(StockType.Stock, StockDataRange.Daily, 0).Returns("test_dzienne");
     TestObj = new InsertCommandGenerator(_dataPumpProvider);
 }
Exemple #2
0
 public string InsertDaily(DataPumpStockData data, StockDefinition stockDefinition)
 {
     return($"insert into {_dataPumpProvider.GetTableName(stockDefinition.Type, StockDataRange.Daily, 0)}(fk_id_spolki, ts, open, high, low, close, refcourse, volume) values " +
            $"({stockDefinition.ID}, to_date('{PrepareDate(data.TS)}', 'YYYY-MM-DD'), " +
            $"{PrepareFloat(data.O)}, {PrepareFloat(data.H)}, {PrepareFloat(data.L)}, {PrepareFloat(data.C)}, {PrepareFloat(data.RefCourse)}, {data.V})");
 }
 public void SetUp()
 {
     _dataPumpProvider = Substitute.For <IDataPumpProvider>();
     _dataPumpProvider.GetTableName(StockType.Stock, StockDataRange.Daily, 0).Returns("test_dzienne");
     TestObj = new StartTSUpdater(_dataPumpProvider);
 }