예제 #1
0
        public void OrderBookContext_update_test()
        {
            OrderBookContext obContext = new OrderBookContext(10);

            obContext.Update(0, "RTS-12.13_FT", 140000, 100, 140010, 50);
            Assert.AreEqual(140010, obContext.GetOfferPrice("RTS-12.13_FT", 0));
            Assert.AreEqual(140000, obContext.GetBidPrice("RTS-12.13_FT", 0));
            Assert.AreEqual(50, obContext.GetOfferVolume("RTS-12.13_FT", 0));
            Assert.AreEqual(100, obContext.GetBidVolume("RTS-12.13_FT", 0));
        }
예제 #2
0
        public void OrderBookContext_update_notification_test()
        {
            OrderBookContext obContext = new OrderBookContext(10);

            obContext.OnQuotesUpdate += new SymbolDataUpdatedNotification(Notify);

            Assert.AreEqual(string.Empty, this.symbol);

            obContext.Update(0, "RTS-12.13_FT", 140000, 100, 140010, 50);

            Assert.AreEqual("RTS-12.13_FT", this.symbol);
        }
예제 #3
0
 public override void OnItemAdded(BidAsk item)
 {
     storage.Update(item.Row, item.Symbol, item.Bid, item.BidSize, item.Ask, item.AskSize);
 }