public void UpdateVariablesAndDataDivThroughDOM_NewLangAdded_AddedToDataDiv()
{
var dom = new HtmlDom(@"<html><head></head><body><div data-book='someVariable' lang='en'>hi</div></body></html>");
var e = dom.RawDom.CreateElement("div");
e.SetAttribute("data-book", "someVariable");
e.SetAttribute("lang", "fr");
e.InnerText = "bonjour";
dom.RawDom.SelectSingleNode("//body").AppendChild(e);
var data = new BookData(dom, new CollectionSettings(), null);
data.UpdateVariablesAndDataDivThroughDOM();
AssertThatXmlIn.Dom(dom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//body/div[1][@id='bloomDataDiv']", 1);//NB microsoft uses 1 as the first. W3c uses 0.
AssertThatXmlIn.Dom(dom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//div[@id='bloomDataDiv']/div[@data-book='someVariable' and @lang='en' and text()='hi']", 1);
AssertThatXmlIn.Dom(dom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//div[@id='bloomDataDiv']/div[@data-book='someVariable' and @lang='fr' and text()='bonjour']", 1);
}