public void UpdateDomFromDataDiv_CCLicense_OnPageTheLicenseHasFrench()
{
_collectionSettings.Language1Iso639Code = "fr";
_collectionSettings.Language2Iso639Code = "en";
//NB: ideally, this test would just set the licenseUrl and then test the resulting description.
//That is, the description would not even be in the datadiv, since all we need is the licenseURl
//(at least for creative commons licenses). We would then just generate the description when we
//update the page.
//However, for backwards compatibility, we still (as of 3.6) determine the description when doing
//a SetMetadata, put the description in the bloomdatadiv, and then it just flows down
//to the page.
var html = @"<html><body>
<div id='bloomDataDiv'>
<div data-book='licenseDescription' lang='es'>Spanish Description</div>
<div data-book='licenseDescription' lang='fr'>French Description</div>
<div data-book='licenseDescription' lang='en'>English Description</div>
</div>
<div id='test'>
<div data-derived='licenseDescription' lang='en'>BoilerPlateDescription</div>
</div>
</body></html>";
var bookDom = new HtmlDom(html);
BookCopyrightAndLicense.UpdateDomFromDataDiv(bookDom, "", _collectionSettings);
AssertThatXmlIn.Dom(bookDom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//div[@id='test']/*[@data-derived='licenseDescription' and @lang='fr' and contains(text(),'French')]", 1);
}