public void SynchronizeDataItemsThroughoutDOM_HasOnlyEnglishContributorsButEnglishIsLang3_CopiesEnglishIntoNationalLanguageSlot()
{
var dom = new HtmlDom(@"<html ><head></head><body>
<div id='bloomDataDiv'>
<div data-book='originalContributions' lang='en'>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='en'></div>
</div>
</div>
</body></html>");
var collectionSettings = new CollectionSettings()
{
Language1Iso639Code = "etr",
Language2Iso639Code = "fr"
};
var data = new BookData(dom, collectionSettings, null);
data.SynchronizeDataItemsThroughoutDOM();
XmlElement englishContributions = (XmlElement)dom.SelectSingleNodeHonoringDefaultNS("//*[@data-book='originalContributions' and @lang='en']");
Assert.AreEqual("the contributions", englishContributions.InnerText, "Should copy English into body of course, as normal");
XmlElement frenchContributions = (XmlElement)dom.SelectSingleNodeHonoringDefaultNS("//*[@data-book='originalContributions' and @lang='fr']");
Assert.AreEqual("the contributions", frenchContributions.InnerText, "Should copy English into French Contributions becuase it's better than just showing nothing");
//Assert.AreEqual("en",frenchContributions.GetAttribute("bloom-languageBloomHadToCopyFrom"),"Should have left a record that we did this dubious 'borrowing' from English");
}