// Internal for testing
        protected internal void LoadNextRelevantBlockInSubsequentBook()
        {
            if (!CanNavigateToNextRelevantBlock)
            {
                return;
            }
            if (m_navigator.IsLastBook(CurrentBook))
            {
                return;
            }

            var currentBookIndex = m_navigator.GetIndicesOfSpecificBlock(CurrentBlock).BookIndex;

            var blockIndex = (IsCurrentBlockRelevant) ? m_currentBlockIndex + 1 :
                             GetIndexOfClosestRelevantBlock(m_relevantBlocks, m_temporarilyIncludedBlock, false, 0, RelevantBlockCount - 1);

            var bookBlockIndices = m_relevantBlocks[blockIndex];

            while (bookBlockIndices.BookIndex == currentBookIndex)
            {
                if (++blockIndex >= m_relevantBlocks.Count)
                {
                    return;
                }
                bookBlockIndices = m_relevantBlocks[blockIndex];
            }

            m_currentBlockIndex = blockIndex;
            SetBlock(bookBlockIndices);
        }
Пример #2
0
        public void IsLastBook_True()
        {
            var lastBook = m_books.Last();

            Assert.AreEqual(true, m_navigator.IsLastBook(lastBook));
        }