Пример #1
0
        public void PeekNthNextBlockWithinBook_NEquals1()
        {
            m_navigator.NavigateToFirstBlock();
            Block result = m_navigator.PeekNthNextBlockWithinBook(1);

            Assert.AreEqual(m_books.First()[1], result);
        }
        protected virtual void PopulateRelevantBlocks()
        {
            m_navigator.NavigateToFirstBlock();
            m_relevantBlocks = new List <BookBlockIndices>();
            Block block = m_navigator.CurrentBlock;

            for (; ;)
            {
                if (IsRelevant(block))
                {
                    m_relevantBlocks.Add(m_navigator.GetIndices());
                    RelevantBlockAdded(block);
                }
                if (m_navigator.IsLastBlock())
                {
                    break;
                }
                block = m_navigator.NextBlock();
            }

            m_navigator.NavigateToFirstBlock();
        }