Skip to content

Commit

Permalink
✅ Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Marthijn van den Heuvel committed Mar 28, 2024
1 parent 6131bd6 commit 04c3702
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void Serialize_WithSitemapContainsVideoNodes_ReturnsXml()
// assert
result.Should().NotBeNullOrEmpty();
result.Should().Be(
$"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?><urlset xmlns:video=\"http://www.google.com/schemas/sitemap-video/1.1\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"><url><loc>{expectedUrl}</loc><lastmod>2024-03-22</lastmod><changefreq>hourly</changefreq><priority>0.3</priority></url><url><loc>{expectedUrl}</loc><video:video><video:thumbnail_loc>{expectedUrl}</video:thumbnail_loc><video:title>{title}</video:title><video:description>{description}</video:description><video:content_loc>{expectedUrl}</video:content_loc><video:player_loc>{expectedUrl}</video:player_loc><video:duration>{duration}</video:duration><video:expiration_date>{video.ExpirationDate:yyyy-MM-ddTHH:mm:ssK}</video:expiration_date><video:rating>1.1</video:rating><video:view_count>{viewCount}</video:view_count><video:restriction relationship=\"deny\">{videoRestriction.Restriction}</video:restriction><video:publication_date>{video.PublicationDate:yyyy-MM-ddTHH:mm:ssK}</video:publication_date><video:family_friendly>{BoolToSitemap(familyFriendly)}</video:family_friendly><video:platform relationship=\"allow\">web</video:platform><video:requires_subscription>{BoolToSitemap(requiresSubscription)}</video:requires_subscription><video:uploader info=\"{expectedUrl}\">{uploader.Name}</video:uploader><video:live>{BoolToSitemap(live)}</video:live><video:tag>{tags.First()}</video:tag></video:video></url></urlset>");
$"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?><urlset xmlns:video=\"http://www.google.com/schemas/sitemap-video/1.1\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"><url><loc>{expectedUrl}</loc><lastmod>{now:yyyy-MM-dd}</lastmod><changefreq>hourly</changefreq><priority>0.3</priority></url><url><loc>{expectedUrl}</loc><video:video><video:thumbnail_loc>{expectedUrl}</video:thumbnail_loc><video:title>{title}</video:title><video:description>{description}</video:description><video:content_loc>{expectedUrl}</video:content_loc><video:player_loc>{expectedUrl}</video:player_loc><video:duration>{duration}</video:duration><video:expiration_date>{video.ExpirationDate:yyyy-MM-ddTHH:mm:ssK}</video:expiration_date><video:rating>1.1</video:rating><video:view_count>{viewCount}</video:view_count><video:restriction relationship=\"deny\">{videoRestriction.Restriction}</video:restriction><video:publication_date>{video.PublicationDate:yyyy-MM-ddTHH:mm:ssK}</video:publication_date><video:family_friendly>{BoolToSitemap(familyFriendly)}</video:family_friendly><video:platform relationship=\"allow\">web</video:platform><video:requires_subscription>{BoolToSitemap(requiresSubscription)}</video:requires_subscription><video:uploader info=\"{expectedUrl}\">{uploader.Name}</video:uploader><video:live>{BoolToSitemap(live)}</video:live><video:tag>{tags.First()}</video:tag></video:video></url></urlset>");
}

private static string BoolToSitemap(bool value) => value ? "yes" : "no";
Expand Down

0 comments on commit 04c3702

Please sign in to comment.