public void GetIndicesOfFirstBlockAtReference_MultiBlockAtSameReference_ReturnsIndicesForFirstStartBlock() { var result = m_navigatorForMultiBlockTests.GetIndicesOfFirstBlockAtReference(new VerseRef(BCVRef.BookToNumber("JUD"), 1, 1)); Assert.AreEqual(0, result.BookIndex); Assert.AreEqual(1, result.BlockIndex); }
public bool TryLoadBlock(VerseRef verseRef) { var indices = m_navigator.GetIndicesOfFirstBlockAtReference(verseRef); if (indices == null) { return(false); } m_currentBlockIndex = m_relevantBlocks.IndexOf(indices); m_temporarilyIncludedBlock = m_currentBlockIndex < 0 ? indices : null; SetBlock(indices); return(true); }
public void GetIndicesOfFirstBlockAtReference_BookNotIncluded_ReturnsNull() { var result = m_navigator.GetIndicesOfFirstBlockAtReference(new VerseRef(65, 1, 2)); Assert.IsNull(result); }