コード例 #1
0
        public void Setup()
        {
            mockProvider = new MockCandleProvider();
            mockProvider.SetCandle(ChartRange.Daily, DailyCandles.Value);

            store = new CandleChartStore(new DbContextOptionsBuilder()
                                         .UseInMemoryDatabase("CandleChartManagerTest")
                                         .Options);
            store.Database.EnsureCreated();
        }
コード例 #2
0
        public void Teardown()
        {
            _server.StopAsync().Wait();
            _server.Dispose();

            using (var context = new CandleChartStore())
            {
                context.Database.EnsureDeleted();
            }
        }
コード例 #3
0
        public void Setup()
        {
            _server = new FakeOandaWebHost();
            _server.Start();

            using (var context = new CandleChartStore())
            {
                context.Database.EnsureDeleted();
                CandleStoreInitializer.Initialize(context);
            }
        }
コード例 #4
0
 public CandleChartManager(DateTime currentTime, Func <TradingSymbol, ChartRange, ICandleProvider> candleProviderFactory, CandleChartStore store)
 {
     this.candleProviderFactory = candleProviderFactory;
     this.store       = store;
     this.currentTime = currentTime;
 }