コード例 #1
0
        public void AddNotification(Trade trade)
        {
            TradeQueueMessage <Trade> tradeMessage = new TradeQueueMessage <Trade>("Trade Added", trade);

            tradeQueue.SendMessage(tradeMessage);
            ChangePrice(trade, TypeOfFunction.Add);
        }   //Notification for Trade Addition
コード例 #2
0
        public void Test_SendMessage()
        {
            Trade trade = new Trade();
            Guid  guid  = Guid.NewGuid();

            trade.Id          = new Guid();
            trade.Side        = 0;
            trade.Status      = 0;
            trade.UserId      = new Guid();
            trade.CommodityId = new Guid();
            trade.LocationId  = new Guid();
            trade.Price       = 1000;
            trade.Quantity    = 20;

            TradeQueueMessage <Trade> tradeQueueMessage = new TradeQueueMessage <Trade>("added", trade);

            TradeMQueue tradeMQueue = new TradeMQueue();
            Boolean     actual      = tradeMQueue.SendMessage(tradeQueueMessage);

            Assert.IsTrue(actual);
        }