コード例 #1
0
        public void GivenDataWith10Items_ConvertToSiteMap_CreatesASitemapResult()
        {
            // Arrange.
            var data = SimpleSiteMapHelpers.CreateFakeSitemapNodes(100, StartDate).ToPartition(10);

            // Act.
            var result = SitemapService.ConvertToXmlSitemap(data);

            // Assert.
            var expectedXml = File.ReadAllText("Result Data//SitemapWith10Items.xml");

            CompareTwoSitemapDocuments(result, expectedXml);
        }
コード例 #2
0
        public void GivenNoPartitionedData_ConvertToSitemap_CreatesASitemapResult()
        {
            // Arrange.r
            var startDate       = DateTime.SpecifyKind(new DateTime(2014, 11, 21, 18, 58, 00), DateTimeKind.Utc);
            var partitionedData = SimpleSiteMapHelpers.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);
        }