public void ShouldPublishTickerSymbolSelectedOnSelectionChanged() { var tickerSymbolSelectedEvent = new MockTickerSymbolSelectedEvent(); eventAggregator.AddMapping <TickerSymbolSelectedEvent>(tickerSymbolSelectedEvent); eventAggregator.AddMapping <MarketPricesUpdatedEvent>(new MockMarketPricesUpdatedEvent()); WatchListPresentationModel presentationModel = CreatePresenter(); presentationModel.CurrentWatchItem = new WatchItem("MyTickerSymbol", 10m); Assert.IsTrue(tickerSymbolSelectedEvent.PublishCalled); Assert.AreEqual("MyTickerSymbol", tickerSymbolSelectedEvent.PublishArg); }
public void ShouldPublishTickerSymbolSelectedOnSelectionChanged() { var tickerSymbolSelectedEvent = new MockTickerSymbolSelectedEvent(); eventAggregator.AddMapping<TickerSymbolSelectedEvent>(tickerSymbolSelectedEvent); eventAggregator.AddMapping<MarketPricesUpdatedEvent>(new MockMarketPricesUpdatedEvent()); WatchListPresentationModel presentationModel = CreatePresenter(); presentationModel.CurrentWatchItem = new WatchItem("MyTickerSymbol", 10m); Assert.IsTrue(tickerSymbolSelectedEvent.PublishCalled); Assert.AreEqual("MyTickerSymbol", tickerSymbolSelectedEvent.PublishArg); }