public SuckInDataFromEditedDom ( |
||
dom | This is either the whole document, or a page div that we just edited and want to read from. | |
return | void |
public void SuckInDataFromEditedDom_NoDataDIvTitleChanged_NewTitleInCache() { HtmlDom bookDom = new HtmlDom(@"<html ><head></head><body> <div class='bloom-page' id='guid2'> <textarea lang='xyz' data-book='bookTitle'>original</textarea> </div> </body></html>"); var data = new BookData(bookDom, _collectionSettings, null); Assert.AreEqual("original", data.GetVariableOrNull("bookTitle", "xyz")); HtmlDom editedPageDom = new HtmlDom(@"<html ><head></head><body> <div class='bloom-page' id='guid2'> <textarea lang='xyz' data-book='bookTitle'>changed</textarea> </div> </body></html>"); data.SuckInDataFromEditedDom(editedPageDom); Assert.AreEqual("changed", data.GetVariableOrNull("bookTitle", "xyz")); }