public void TestThatDefaultFeedReadsFirstFeedItemArchivedSecondFeedItemIncomplete()
        {
            var feed = Feed.DefaultFeedWith(_world.Stage, "test", typeof(TextEntryReaderFeeder), _entryReader);

            var extra   = 3;
            var entries = feed.MessagesPerFeedItem + extra;

            var dispatcherAccess = _dispatcher.AfterCompleting(entries);

            for (var idx = 0; idx < entries; ++idx)
            {
                _journal.Append("stream-" + idx, 1, new TestEvents.Event1(), _interest, null);
            }

            var count = dispatcherAccess.ReadFrom <int>("entriesCount");

            Assert.Equal(entries, count);

            var consumerAccess = _consumer.AfterCompleting(2);

            feed.Feeder.FeedItemTo(FeedItemId.With(1), _consumer);
            feed.Feeder.FeedItemTo(FeedItemId.With(2), _consumer);

            var feedItems = consumerAccess.ReadFrom <Dictionary <long, FeedItem> >("feedItems");

            Assert.Equal(2, feedItems.Count);
            Assert.Equal(feed.MessagesPerFeedItem, feedItems[1L].Messages.Count());
            Assert.True(feedItems[1L].Archived);
            Assert.Equal(extra, feedItems[2L].Messages.Count());
            Assert.False(feedItems[2L].Archived);
        }
        public void TestThatDefaultFeedReadsFirstFeedItemIncomplete()
        {
            var feed = Feed.DefaultFeedWith(_world.Stage, "test", typeof(TextEntryReaderFeeder), _entryReader);

            var dispatcherAccess = _dispatcher.AfterCompleting(3);

            _journal.Append("stream-1", 1, new TestEvents.Event1(), _interest, null);
            _journal.Append("stream-2", 1, new TestEvents.Event2(), _interest, null);
            _journal.Append("stream-3", 1, new TestEvents.Event3(), _interest, null);

            var count = dispatcherAccess.ReadFrom <int>("entriesCount");

            Assert.Equal(3, count);

            var consumerAccess = _consumer.AfterCompleting(1);

            feed.Feeder.FeedItemTo(FeedItemId.With(1), _consumer);

            var feedItems = consumerAccess.ReadFrom <Dictionary <long, FeedItem> >("feedItems");

            Assert.Single(feedItems);
            Assert.False(feedItems[1L].Archived);
        }