/// ------------------------------------------------------------------------------------
        /// <summary>
        ///
        /// </summary>
        /// ------------------------------------------------------------------------------------
        protected override void CreateTestData()
        {
            ITsStrFactory strfact = TsStrFactoryClass.Create();

            //Jude
            IScrBook jude = AddBookToMockedScripture(65, "Jude");

            AddTitleToMockedBook(jude, "Jude");

            // Jude Scripture section
            IScrSection section = AddSectionToMockedBook(jude);

            AddSectionHeadParaToSection(section, "First section", "Section Head");
            IStTxtPara judePara = AddParaToMockedSectionContent(section, "Paragraph");

            AddRunToMockedPara(judePara, "1", ScrStyleNames.ChapterNumber);
            AddRunToMockedPara(judePara, "1", ScrStyleNames.VerseNumber);
            AddRunToMockedPara(judePara, "This is the first verse", null);

            // Insert footnote into para 1 of Jude
            ITsStrBldr   bldr     = judePara.Contents.GetBldr();
            IScrFootnote foot     = jude.InsertFootnoteAt(0, bldr, 10);
            IScrTxtPara  footPara = Cache.ServiceLocator.GetInstance <IScrTxtParaFactory>().CreateWithStyle(
                foot, ScrStyleNames.NormalFootnoteParagraph);

            footPara.Contents = strfact.MakeString("This is text for the footnote.", Cache.DefaultVernWs);
            judePara.Contents = bldr.GetString();
        }
        /// ------------------------------------------------------------------------------------
        /// <summary>
        ///
        /// </summary>
        /// ------------------------------------------------------------------------------------
        protected override void CreateTestData()
        {
            ITsStrFactory strfact = TsStrFactoryClass.Create();

            //James
            IScrBook book = AddBookToMockedScripture(59, "James");

            AddTitleToMockedBook(book, "James");

            // James first section
            IScrSection section = AddSectionToMockedBook(book);

            AddSectionHeadParaToSection(section, "Paul tells people", "Section Head");
            IStTxtPara para = AddParaToMockedSectionContent(section, "Paragraph");

            AddRunToMockedPara(para, "1", "Chapter Number");
            AddRunToMockedPara(para, "1", "Verse Number");
            AddRunToMockedPara(para, "and the earth was without form and void and darkness covered the face of the deep", null);

            // James section2
            IScrSection section2 = AddSectionToMockedBook(book);

            AddSectionHeadParaToSection(section2, "Paul tells people more", "Section Head");
            IStTxtPara para2 = AddParaToMockedSectionContent(section2, "Paragraph");

            AddRunToMockedPara(para2, "2", "Chapter Number");
            AddRunToMockedPara(para2, "1", "Verse Number");
            AddRunToMockedPara(para2, "paul expounds on the nature of reality", null);
            IStTxtPara para3 = AddParaToMockedSectionContent(section2, "Paragraph");

            AddRunToMockedPara(para3, "2", "Verse Number");
            AddRunToMockedPara(para3, "the existentialists are all wrong", null);

            // insert footnotes into para 2 of James
            ITsStrBldr jamesBldr = para2.Contents.GetBldr();
            int        iFootIch  = 10;

            for (int i = 0; i < 2; i++)
            {
                IStFootnote foot     = book.InsertFootnoteAt(i, jamesBldr, iFootIch);
                IScrTxtPara footPara = Cache.ServiceLocator.GetInstance <IScrTxtParaFactory>().CreateWithStyle(
                    foot, ScrStyleNames.NormalFootnoteParagraph);
                footPara.Contents = strfact.MakeString("This is footnote text for footnote " + i.ToString(), Cache.DefaultVernWs);
                iFootIch         += 20;
            }
            para2.Contents = jamesBldr.GetString();

            //Jude
            m_Jude = AddBookToMockedScripture(65, "Jude");
            AddTitleToMockedBook(m_Jude, "Jude");

            //Jude intro section
            IScrSection judeSection = AddSectionToMockedBook(m_Jude);

            AddSectionHeadParaToSection(judeSection, "Introduction", "Intro Section Head");
            IStTxtPara judePara = AddParaToMockedSectionContent(judeSection, "Intro Paragraph");

            AddRunToMockedPara(judePara, "The Letter from Jude was written to warn against" +
                               " false teachers who claimed to be believers. In this brief letter, which is similar in" +
                               " content to 2 Peter the writer encourages his readers “to fight on for the faith which" +
                               " once and for all God has given to his people.", null);
            // Insert BT (in two different writing systems) of intro paragraph
            ICmTranslation transEn = AddBtToMockedParagraph(judePara, m_wsEn);
            ICmTranslation transDe = AddBtToMockedParagraph(judePara, m_wsDe);

            // Jude Scripture section
            IScrSection judeSection2 = AddSectionToMockedBook(m_Jude);

            AddSectionHeadParaToSection(judeSection2, "First section", "Section Head");
            IStTxtPara judePara2 = AddParaToMockedSectionContent(judeSection2, "Paragraph");

            AddRunToMockedPara(judePara2, "1", ScrStyleNames.ChapterNumber);
            AddRunToMockedPara(judePara2, "1", ScrStyleNames.VerseNumber);
            AddRunToMockedPara(judePara2, "This is the first verse", null);
            AddRunToMockedPara(judePara2, "2", ScrStyleNames.VerseNumber);
            AddRunToMockedPara(judePara2, "This is the second verse", null);
            AddRunToMockedPara(judePara2, "3", ScrStyleNames.VerseNumber);
            AddRunToMockedPara(judePara2, "This is the third verse", null);
            AddRunToMockedPara(judePara2, "4", ScrStyleNames.VerseNumber);
            AddRunToMockedPara(judePara2, "This is the fourth verse", null);

            // Insert footnotes into para 1 of Jude
            ITsStrBldr bldr = judePara.Contents.GetBldr();

            iFootIch = 10;
            for (int i = 0; i < 4; i++)
            {
                IStFootnote foot     = m_Jude.InsertFootnoteAt(i, bldr, iFootIch);
                IScrTxtPara footPara = Cache.ServiceLocator.GetInstance <IScrTxtParaFactory>().CreateWithStyle(
                    foot, ScrStyleNames.NormalFootnoteParagraph);
                footPara.Contents = strfact.MakeString("This is text for footnote " + i.ToString(), Cache.DefaultVernWs);
                iFootIch         += 30;
                // Insert ORC for footnote into BT (in both writing systems)
                AddBtFootnote(transEn, i, m_wsEn, foot);
                AddBtFootnote(transDe, i, m_wsDe, foot);
            }
            judePara.Contents = bldr.GetString();

            // Insert footnotes into para 2 of Jude
            bldr     = judePara2.Contents.GetBldr();
            iFootIch = 10;
            for (int i = 0; i < 4; i++)
            {
                IStFootnote foot     = m_Jude.InsertFootnoteAt(i + 4, bldr, iFootIch);
                IScrTxtPara footPara = Cache.ServiceLocator.GetInstance <IScrTxtParaFactory>().CreateWithStyle(
                    foot, ScrStyleNames.NormalFootnoteParagraph);
                footPara.Contents = strfact.MakeString("This is text for footnote " + (i + 4).ToString(), Cache.DefaultVernWs);
                iFootIch         += 20;
            }
            judePara2.Contents = bldr.GetString();
        }
Пример #3
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		///
		/// </summary>
		/// ------------------------------------------------------------------------------------
		protected override void CreateTestData()
		{
			ITsStrFactory strfact = TsStrFactoryClass.Create();

			//James
			IScrBook book = AddBookToMockedScripture(59, "James");
			AddTitleToMockedBook(book, "James");

			// James first section
			IScrSection section = AddSectionToMockedBook(book);
			AddSectionHeadParaToSection(section, "Paul tells people", "Section Head");
			IStTxtPara para = AddParaToMockedSectionContent(section, "Paragraph");
			AddRunToMockedPara(para, "1", "Chapter Number");
			AddRunToMockedPara(para, "1", "Verse Number");
			AddRunToMockedPara(para, "and the earth was without form and void and darkness covered the face of the deep", null);

			// James section2
			IScrSection section2 = AddSectionToMockedBook(book);
			AddSectionHeadParaToSection(section2, "Paul tells people more", "Section Head");
			IStTxtPara para2 = AddParaToMockedSectionContent(section2, "Paragraph");
			AddRunToMockedPara(para2, "2", "Chapter Number");
			AddRunToMockedPara(para2, "1", "Verse Number");
			AddRunToMockedPara(para2, "paul expounds on the nature of reality", null);
			IStTxtPara para3 = AddParaToMockedSectionContent(section2, "Paragraph");
			AddRunToMockedPara(para3, "2", "Verse Number");
			AddRunToMockedPara(para3, "the existentialists are all wrong", null);

			// insert footnotes into para 2 of James
			ITsStrBldr jamesBldr = para2.Contents.GetBldr();
			int iFootIch = 10;
			for (int i = 0; i < 2; i++)
			{
				IStFootnote foot = book.InsertFootnoteAt(i, jamesBldr, iFootIch);
				IScrTxtPara footPara = Cache.ServiceLocator.GetInstance<IScrTxtParaFactory>().CreateWithStyle(
					foot, ScrStyleNames.NormalFootnoteParagraph);
				footPara.Contents = strfact.MakeString("This is footnote text for footnote " + i.ToString(), Cache.DefaultVernWs);
				iFootIch += 20;
			}
			para2.Contents = jamesBldr.GetString();

			//Jude
			m_Jude = AddBookToMockedScripture(65, "Jude");
			AddTitleToMockedBook(m_Jude, "Jude");

			//Jude intro section
			IScrSection judeSection = AddSectionToMockedBook(m_Jude);
			AddSectionHeadParaToSection(judeSection, "Introduction", "Intro Section Head");
			IStTxtPara judePara = AddParaToMockedSectionContent(judeSection, "Intro Paragraph");
			AddRunToMockedPara(judePara, "The Letter from Jude was written to warn against" +
				" false teachers who claimed to be believers. In this brief letter, which is similar in" +
				" content to 2 Peter the writer encourages his readers \u201Cto fight on for the faith which" +
				" once and for all God has given to his people.", null);
			// Insert BT (in two different writing systems) of intro paragraph
			ICmTranslation transEn = AddBtToMockedParagraph(judePara, m_wsEn);
			ICmTranslation transDe = AddBtToMockedParagraph(judePara, m_wsDe);

			// Jude Scripture section
			IScrSection judeSection2 = AddSectionToMockedBook(m_Jude);
			AddSectionHeadParaToSection(judeSection2, "First section", "Section Head");
			IStTxtPara judePara2 = AddParaToMockedSectionContent(judeSection2, "Paragraph");
			AddRunToMockedPara(judePara2, "1", ScrStyleNames.ChapterNumber);
			AddRunToMockedPara(judePara2, "1", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(judePara2, "This is the first verse", null);
			AddRunToMockedPara(judePara2, "2", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(judePara2, "This is the second verse", null);
			AddRunToMockedPara(judePara2, "3", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(judePara2, "This is the third verse", null);
			AddRunToMockedPara(judePara2, "4", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(judePara2, "This is the fourth verse", null);

			// Insert footnotes into para 1 of Jude
			ITsStrBldr bldr = judePara.Contents.GetBldr();
			iFootIch = 10;
			for (int i = 0; i < 4; i++)
			{
				IStFootnote foot = m_Jude.InsertFootnoteAt(i, bldr, iFootIch);
				IScrTxtPara footPara = Cache.ServiceLocator.GetInstance<IScrTxtParaFactory>().CreateWithStyle(
					foot, ScrStyleNames.NormalFootnoteParagraph);
				footPara.Contents = strfact.MakeString("This is text for footnote " + i.ToString(), Cache.DefaultVernWs);
				iFootIch += 30;
				// Insert ORC for footnote into BT (in both writing systems)
				AddBtFootnote(transEn, i, m_wsEn, foot);
				AddBtFootnote(transDe, i, m_wsDe, foot);
			}
			judePara.Contents = bldr.GetString();

			// Insert footnotes into para 2 of Jude
			bldr = judePara2.Contents.GetBldr();
			iFootIch = 10;
			for (int i = 0; i < 4; i++)
			{
				IStFootnote foot = m_Jude.InsertFootnoteAt(i + 4, bldr, iFootIch);
				IScrTxtPara footPara = Cache.ServiceLocator.GetInstance<IScrTxtParaFactory>().CreateWithStyle(
					foot, ScrStyleNames.NormalFootnoteParagraph);
				footPara.Contents = strfact.MakeString("This is text for footnote " + (i+4).ToString(), Cache.DefaultVernWs);
				iFootIch += 20;
			}
			judePara2.Contents = bldr.GetString();
		}