예제 #1
0
        public void ParseChapterVerseLine()
        {
            versification.ParseChapterVerseLine("HAB 1:17 2:20 3:19");

            int          bookId   = Canon.BookIdToNumber("HAB");
            List <int[]> bookList = versification.bookList();

            Assert.AreEqual(bookList.Count, bookId);
            Assert.AreEqual(bookList[bookId - 1], new [] { 17, 20, 19 });

            Assert.AreEqual(bookId, versification.GetLastBook(),
                            "HAB should be the last book in the versification");
            Assert.AreEqual(3, versification.GetLastChapter(bookId), "HAB has three chapters");
            Assert.AreEqual(17, versification.GetLastVerse(bookId, 1), "HAB 1 has 17 verses");
            Assert.AreEqual(20, versification.GetLastVerse(bookId, 2), "HAB 2 has 20 verses");
            Assert.AreEqual(19, versification.GetLastVerse(bookId, 3), "HAB 3 has 19 verses");
        }