public void TestNullContent() { IEnumerable <ISitemapContent> nullContent = null; var generator = new XmlSitemapGenerator(); generator.Generate(nullContent); }
public void TestContents() { var generator = new XmlSitemapGenerator(); var sitemap = generator.Generate(_mockContent); Assert.AreEqual("urlset", sitemap.Root.Name, "urlset is not the root element"); Assert.AreEqual(2, sitemap.Root.Elements().Count(), "the sitmap has an incorrect number of urls"); }
public void TestDeclaration() { var generator = new XmlSitemapGenerator(); var sitemap = generator.Generate(_mockContent); Assert.AreEqual("1.0", sitemap.Declaration.Version, "the sitemap version is incorrect."); Assert.AreEqual("utf-8", sitemap.Declaration.Encoding, "the sitemap version is incorrect."); Assert.AreEqual("yes", sitemap.Declaration.Standalone, "the sitemap should be standalone."); }