public void ShouldTransitionToTerminating() { RecentEventsFeed recentEventsFeed = RecentEventsFeedBuilder.FullCurrentFeed(); ITask start = new NotifyingListeners(recentEventsFeed); ITask end = start.Execute(new InMemoryFileSystem(), new EventBufferBuilder().Build(), new FeedBuilder(SampleLinks.Instance), (args => { })); Assert.IsInstanceOf(typeof (Terminate), end); }
public void ShouldNotifyListeners() { FeedMappingsChangedEventArgs args = null; Action<FeedMappingsChangedEventArgs> notifyListeners = a => args = a; RecentEventsFeed recentEventsFeed = RecentEventsFeedBuilder.FullCurrentFeed(); ITask start = new NotifyingListeners(recentEventsFeed); start.Execute(new InMemoryFileSystem(), new EventBufferBuilder().Build(), new FeedBuilder(SampleLinks.Instance), notifyListeners); Assert.AreEqual(args.RecentEventsFeedResourceId, recentEventsFeed.GetFeedMapping().Id.GetValue().ToString()); Assert.AreEqual(args.RecentEventsFeedStoreId, recentEventsFeed.GetFeedMapping().FileName.GetValue()); }