public void It_Saves_A_Generated_Sitemap_Index_File_From_The_Specified_Sitemaps()
        {
            //--arrange
            var sitemaps = new List <SitemapInfo>
            {
                new SitemapInfo(new Uri("https://example.com"), DateTime.UtcNow),
                new SitemapInfo(new Uri("https://example2.com"), DateTime.UtcNow.AddDays(-1))
            };
            var expectedDirectory = new DirectoryInfo(_sitemapLocation);
            var expectedFilename  = "testSitemapIndex1.xml";

            //--act
            _sitemapIndexGenerator.GenerateSitemapIndex(sitemaps, expectedDirectory, expectedFilename);

            //--assert
            //--go looks in the {sitemapLocation} directory
        }
        public void It_Saves_A_Generated_Sitemap_Index_File_From_The_Specified_Sitemaps()
        {
            //--arrange
            var sitemaps = new List <SitemapInfo>
            {
                new SitemapInfo(new Uri("https://example.com"), DateTime.UtcNow),
                new SitemapInfo(new Uri("https://example2.com"), DateTime.UtcNow.AddDays(-1))
            };
            var expectedDirectory = new DirectoryInfo(@"C:\temp\sitemaptests\");
            var expectedFilename  = "testSitemapIndex1.xml";

            //--act
            _sitemapIndexGenerator.GenerateSitemapIndex(sitemaps, expectedDirectory, expectedFilename);

            //--assert
            _sitemapIndexSerializerMock
            .Received()
            .SerializeAndSave(
                Arg.Is <SitemapIndex>(x => AssertCorrectSitemapIndexWasSerialized(sitemaps, x)),
                Arg.Is <DirectoryInfo>(x => x == expectedDirectory),
                Arg.Is <string>(x => x == expectedFilename));
        }