示例#1
0
        public void SubscriberTest()
        {
            Market market = new Market(new string[] { "Apple", "Google" });
            var    mock   = new Mock <ISubscriber>();

            mock.Setup(foo => foo.Notified(market, It.IsAny <MarketEventArgs>()));
            market.AddSubscriber(mock.Object);
            market.Trade();
            mock.Verify(r => r.Notified(market, It.IsAny <MarketEventArgs>()));
        }