public void SynthOrderBook_GetAsks_Inverted_Test() { var gbpusdOb = new OrderBook("FE", _gbpusd, new List <LimitOrder> // bids { new LimitOrder(1.28167m, 2909.98m), new LimitOrder(1.29906m, 50000m) }, new List <LimitOrder>(), // asks DateTime.Now); var bids = SynthOrderBook.GetAsks(gbpusdOb, _usdgbp).ToList(); var orderedBids = bids.OrderBy(x => x.Price).ToList(); Assert.Equal(2, bids.Count); Assert.Equal(bids[0].Price, orderedBids[0].Price); Assert.Equal(bids[1].Price, orderedBids[1].Price); }
public void SynthOrderBook_GetAsks_Streight_Test() { var gbpusdOb = new OrderBook("FE", _gbpusd, new List <VolumePrice>(), // bids new List <VolumePrice> // asks { new VolumePrice(1.29906m, 50000m), new VolumePrice(1.28167m, 2909.98m) }, DateTime.Now); var bids = SynthOrderBook.GetAsks(gbpusdOb, _gbpusd).ToList(); var orderedBids = bids.OrderBy(x => x.Price).ToList(); Assert.Equal(2, bids.Count); Assert.Equal(bids[0].Price, orderedBids[0].Price); Assert.Equal(bids[1].Price, orderedBids[1].Price); }