BloomTests.Book.BookDataTests.SynchronizeDataItemsThroughoutDOM_HasOnlyEdoloContributors_CopiesItIntoL2ButNotL1 C# (CSharp) Method

SynchronizeDataItemsThroughoutDOM_HasOnlyEdoloContributors_CopiesItIntoL2ButNotL1() private method

        public void SynchronizeDataItemsThroughoutDOM_HasOnlyEdoloContributors_CopiesItIntoL2ButNotL1()
        {
            var dom = new HtmlDom(@"<html ><head></head><body>
                <div id='bloomDataDiv'>
                     <div data-book='originalContributions' lang='etr'>the contributions</div>
                </div>
                <div class='bloom-page verso'>
                     <div id='originalContributions' class='bloom-translationGroup'>
                        <div class='bloom-copyFromOtherLanguageIfNecessary' data-book='originalContributions' lang='fr'></div>
                        <div  class='bloom-copyFromOtherLanguageIfNecessary'  data-book='originalContributions' lang='xyz'></div>
                    </div>
                </div>
                </body></html>");
            var collectionSettings = new CollectionSettings()
            {
                      Language1Iso639Code = "xyz",
                      Language2Iso639Code = "fr"
            };
            var data = new BookData(dom, collectionSettings, null);
            data.SynchronizeDataItemsThroughoutDOM();
            XmlElement frenchContributions = (XmlElement)dom.SelectSingleNodeHonoringDefaultNS("//*[@data-book='originalContributions' and @lang='fr']");
            Assert.AreEqual("the contributions", frenchContributions.InnerText, "Should copy Edolo into French Contributions becuase it's better than just showing nothing");
            XmlElement vernacularContributions = (XmlElement)dom.SelectSingleNodeHonoringDefaultNS("//*[@data-book='originalContributions' and @lang='xyz']");
            Assert.AreEqual("", vernacularContributions.InnerText, "Should not copy Edolo into Vernacualr Contributions. Only national language fields get this treatment");
        }
BookDataTests