Ejemplo n.º 1
0
        public void ParseMappingLine_CompareBaseToCustomized()
        {
            Versification vers2 = ScrVersReflectionHelper.CreateClonedVers(versification.VersInfo,
                                                                           versification.Name + "-monkey");
            ScrVers versification2 = new ScrVers(vers2);

            versification.ParseChapterVerseLine(
                "ACT 1:26 2:47 3:26 4:37 5:42 6:15 7:60 8:40 9:43 10:48 11:30 12:25 13:52 14:28 15:41 16:40 17:34 18:28 19:41 20:38 21:40 22:30 23:35 24:27 25:27 26:32 27:44 28:31");
            versification2.ParseChapterVerseLine(
                "ACT 1:26 2:47 3:26 4:37 5:42 6:15 7:60 8:40 9:43 10:48 11:30 12:25 13:52 14:28 15:41 16:40 17:34 18:28 19:41 20:38 21:40 22:30 23:35 24:27 25:27 26:32 27:44 28:31");

            versification2.ParseMappingLine("ACT 19:41 = ACT 19:40");
            versification.ParseMappingLine("ACT 19:41 = ACT 19:40");

            // Even tho we have both vers 40 and 41 mapped to the same verse, doing a conversion between the
            // two versification should not cause the original distinction to be lost if both versifications are
            // based on the same original versification.

            VerseRef vref = new VerseRef("ACT 19:40", versification);

            versification2.ChangeVersification(ref vref);
            Assert.AreEqual(new VerseRef("ACT 19:40", versification2), vref);

            vref = new VerseRef("ACT 19:41", versification);
            versification2.ChangeVersification(ref vref);
            Assert.AreEqual(new VerseRef("ACT 19:41", versification2), vref);
        }
Ejemplo n.º 2
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");
        }