private void TestUpdateImgMetadataAttributesToMatchImage(string contents)
{
var dom = new XmlDocument();
dom.LoadXml(contents);
using (var folder = new TemporaryFolder("bloom pictures test source"))
{
MakeSamplePngImageWithMetadata(folder.Combine("test.png"));
ImageUpdater.UpdateImgMetdataAttributesToMatchImage(folder.FolderPath,
dom.SelectSingleNode("//*[@id='two']") as XmlElement, new NullProgress());
}
AssertThatXmlIn.Dom(dom).HasSpecifiedNumberOfMatchesForXpath("//*[@data-copyright='Copyright 1999 by me']", 1);
AssertThatXmlIn.Dom(dom).HasSpecifiedNumberOfMatchesForXpath("//*[@data-creator='joe']", 1);
AssertThatXmlIn.Dom(dom).HasSpecifiedNumberOfMatchesForXpath("//*[@data-license='cc-by-nd']", 1);
}