public void Create() { var factory = new ConnectionStringFactory(_configuration); var repo = new ReddeerMarketRepository(factory, _cfiInstrumentMapper, _logger); repo.Create(Frame()); Assert.IsTrue(true); }
public async Task Get() { var factory = new ConnectionStringFactory(_configuration); var repo = new ReddeerMarketRepository(factory, _cfiInstrumentMapper, _logger); repo.Create(Frame()); repo.Create(Frame()); var results = await repo.GetEquityIntraday(DateTime.UtcNow.AddMinutes(-5), DateTime.UtcNow, _opCtx); Assert.IsTrue(true); }
public async Task Create_OrderMultipleInsert_DoesNotThrow() { var factory = new ConnectionStringFactory(this._configuration); var marketRepository = new ReddeerMarketRepository( factory, new CfiInstrumentTypeMapper(), new NullLogger <ReddeerMarketRepository>()); var repo = new OrdersRepository(factory, marketRepository, this._orderBrokerRepository, this._logger); var securityIdentifiers1 = new InstrumentIdentifiers( null, null, null, "6657789", "6657789", null, null, null, null, null, "STAN1", null); var security1 = new FinancialInstrument( InstrumentTypes.Equity, securityIdentifiers1, "Standard Chartered", "CFI", "USD", "Standard Chartered Bank"); var securityIdentifiers2 = new InstrumentIdentifiers( null, null, null, "B00KT68", "B00KT68", null, null, null, null, null, "STAN1", null); var security2 = new FinancialInstrument( InstrumentTypes.Equity, securityIdentifiers2, "Standard Chartered", "CFI", "USD", "Standard Chartered Bank"); var securityIdentifiers3 = new InstrumentIdentifiers( null, null, null, "B00KT68", "B00KT68", null, null, null, null, null, "STAN1", null); var security3 = new FinancialInstrument( InstrumentTypes.Equity, securityIdentifiers3, "Standard Chartered", "CFI", "USD", "Standard Chartered Bank"); var exch = new Market(null, "NA", "NA", MarketTypes.STOCKEXCHANGE); var order1 = this.OrderMultiple(security1, exch); var order2 = this.OrderMultiple(security2, exch); var order3 = this.OrderMultiple(security3, exch); var order4 = this.OrderMultiple(security1, exch); await repo.Create(order1); await repo.Create(order2); await repo.Create(order3); await repo.Create(order4); var result1 = await repo.Get(order1.PlacedDate.Value, order3.PlacedDate.Value, this._opCtx); Assert.AreEqual(result1.Count, 3); }