Exemplo n.º 1
0
        public void MatchSellOrderTest()
        {
            ulong sellQuantity = m_SellOrder.Quantity;

            Assert.True(OrderProcessor.TryMatchOrder(m_SellOrder, m_BuyOrders, m_Trades));
            Trade trade = m_TradeProcessor.Trades[0];

            Assert.That(trade.Instrument, Is.EqualTo(m_Instrument));
            Assert.That(trade.Price, Is.EqualTo(m_BuyOrder.Price));
            Assert.That(trade.Quantity, Is.EqualTo(sellQuantity));

            Assert.That(m_BuyOrders.Count() == 0);
        }