BloomTests.Publish.ExportEpubTests.CheckBasicsInManifest C# (CSharp) Method

CheckBasicsInManifest() private method

private CheckBasicsInManifest ( ) : void
return void
        private void CheckBasicsInManifest(params string[] imageFiles)
        {
            VerifyThatFilesInManifestArePresent();
            // xpath search for slash in attribute value fails (something to do with interpreting it as a namespace reference?)
            var assertThatManifest = AssertThatXmlIn.String(_manifestContent.Replace("application/", "application^slash^"));
            assertThatManifest.HasAtLeastOneMatchForXpath("package[@version='3.0']");
            assertThatManifest.HasAtLeastOneMatchForXpath("package[@unique-identifier]");
            assertThatManifest.HasAtLeastOneMatchForXpath("opf:package/opf:metadata/dc:title", _ns);
            assertThatManifest.HasAtLeastOneMatchForXpath("opf:package/opf:metadata/dc:language", _ns);
            assertThatManifest.HasAtLeastOneMatchForXpath("opf:package/opf:metadata/dc:identifier", _ns);
            assertThatManifest.HasAtLeastOneMatchForXpath("package/metadata/meta[@property='dcterms:modified']");

            // This is not absolutely required, but it's true for all our test cases and the way we generate books.
            assertThatManifest.HasAtLeastOneMatchForXpath("package/manifest/item[@id='f1' and @href='1.xhtml']");
            // And that one page must be in the spine
            assertThatManifest.HasAtLeastOneMatchForXpath("package/spine/itemref[@idref='f1']");
            assertThatManifest.HasAtLeastOneMatchForXpath("package/manifest/item[@properties='nav']");
            assertThatManifest.HasAtLeastOneMatchForXpath("package/manifest/item[@properties='cover-image']");

            assertThatManifest.HasAtLeastOneMatchForXpath("package/manifest/item[@id='settingsCollectionStyles' and @href='settingsCollectionStyles.css']");
            assertThatManifest.HasAtLeastOneMatchForXpath("package/manifest/item[@id='customCollectionStyles' and @href='customCollectionStyles.css']");
            assertThatManifest.HasAtLeastOneMatchForXpath("package/manifest/item[@id='customBookStyles' and @href='customBookStyles.css']");

            assertThatManifest.HasAtLeastOneMatchForXpath("package/manifest/item[@id='AndikaNewBasic-R' and @href='AndikaNewBasic-R.ttf' and @media-type='application^slash^vnd.ms-opentype']");
            assertThatManifest.HasAtLeastOneMatchForXpath("package/manifest/item[@id='AndikaNewBasic-B' and @href='AndikaNewBasic-B.ttf' and @media-type='application^slash^vnd.ms-opentype']");
            // It should include italic and BI too...though eventually it may get smarter and figure they are not used...but I think this is enough to test
            assertThatManifest.HasAtLeastOneMatchForXpath("package/manifest/item[@id='fonts' and @href='fonts.css']");

            foreach (var image in imageFiles)
                assertThatManifest.HasAtLeastOneMatchForXpath("package/manifest/item[@id='" + image + "' and @href='" + image + ".png']");
        }