Esempio n. 1
0
        public void ProcessVersLine_Custom_ChapterVerseUpdated()
        {
            versification.ProcessVersLine("HAB 1:17 2:20 3:19");

            // Add a custom line that updates the original chapter-verse versification for Habakkuk
            versification.ProcessVersLine("HAB 1:15 2:13 3:22 4:21");

            // Confirm that the custom versification overrides the original
            int          bookId   = Canon.BookIdToNumber("HAB");
            List <int[]> bookList = versification.bookList();

            Assert.AreEqual(bookList.Count, bookId);
            Assert.AreEqual(bookList[bookId - 1], new int[] { 15, 13, 22, 21 });

            Assert.AreEqual(4, versification.GetLastChapter(bookId),
                            "The customized version of HAB should have four chapters");
            Assert.AreEqual(15, versification.GetLastVerse(bookId, 1), "Custom HAB 1 has 15 verses");
            Assert.AreEqual(13, versification.GetLastVerse(bookId, 2), "Custom HAB 2 has 13 verses");
            Assert.AreEqual(22, versification.GetLastVerse(bookId, 3), "Custom HAB 3 has 22 verses");
            Assert.AreEqual(21, versification.GetLastVerse(bookId, 4), "Custom HAB 4 has 21 verses");
        }