public void ConflictingIds_AreNotConfused()
{
// Files called 12.png and f12.png are quite safe and distinct as files, but they will generate the same ID,
// so one must be fixed. The second occurrence of f12, however, should not cause another file to be generated.
var book = SetupBook("This is some text", "xyz", "12", "f12", "f12");
MakeImageFiles(book, "12", "f12");
MakeEpub("output", "ConflictingIds_AreNotConfused", book);
CheckBasicsInManifest(); // don't check the file stuff here, we're looking at special cases
CheckBasicsInPage();
CheckNavPage();
CheckFontStylesheet();
var assertThatManifest = AssertThatXmlIn.String(_manifestContent);
assertThatManifest.HasAtLeastOneMatchForXpath("package/manifest/item[@id='f12' and @href='12.png']");
assertThatManifest.HasSpecifiedNumberOfMatchesForXpath("package/manifest/item[@id='f121' and @href='f12.png']", 1);
assertThatManifest.HasNoMatchForXpath("package/manifest/item[@href='f121.png']"); // What it would typically generate if it made another copy.
AssertThatXmlIn.String(_page1Data).HasAtLeastOneMatchForXpath("//img[@src='12.png']");
AssertThatXmlIn.String(_page1Data).HasSpecifiedNumberOfMatchesForXpath("//img[@src='f12.png']", 2);
GetZipEntry(_epub, "content/12.png");
GetZipEntry(_epub, "content/f12.png");
}