public void GivenNoPartitionedData_ConvertToSitemap_CreatesASitemapResult() { // Arrange.r var startDate = DateTime.SpecifyKind(new DateTime(2014, 11, 21, 18, 58, 00), DateTimeKind.Utc); var partitionedData = CreateFakeSitemapNodes(0, startDate); var siteMapService = new SitemapService(); // Act. var result = siteMapService.ConvertToXmlSitemap(partitionedData); // Assert. var expectedXml = File.ReadAllText("Result Data\\SitemapWith0Items.xml"); CompareTwoSitemapDocuments(result, expectedXml); }
public void GivenSomeData_ConvertToSiteMap_CreatesAUrlsetResult() { // Arrange. var startDate = DateTime.SpecifyKind(new DateTime(2014, 11, 21, 18, 58, 00), DateTimeKind.Utc); var data = CreateFakeSitemapNodes(10, startDate); var siteMapService = new SitemapService(); // Act. var result = siteMapService.ConvertToXmlUrlset(data); // Assert. var expectedXml = File.ReadAllText("Result Data\\UrlsetWith10Items.xml"); // My sample data is a bit messed up - which is why I have to do the `replace`. CompareTwoUrlsetDocuments(result, expectedXml); }