Exemple #1
0
        public void Is_Passed_An_Object_Of_Attachment_Then_Render_Returns_The_Html(ArticleRelatedControlRenderer renderer)
        {
            var attachment = new ArticleRelated()
            {
                Description = "description",
                Title       = "title",
                HubType     = "hub",
                Slug        = "slug",
                Summary     = "summary"
            };

            var actual = renderer.Render(attachment);

            actual.Value.Should().NotBeNullOrWhiteSpace();
            actual.Value.Should().Be("<div class=\"govuk-grid-column-one-half\"><div class=\"fiu-card\"><span class=\"fiu-card__category\"><a class=\"fiu-card__category-link\" href=\"/hub/slug\">title</a></span><h3 class=\"fiu-card__heading\">title</h3><p class=\"fiu-card__content\">description</p><a href=\"/hub/slug\" class=\"fiu-card__link\">Learn more <span class=\"fiu-vh\"> about title</span></a></div></div>");
        }
Exemple #2
0
        public void Is_Passed_An_Object_Of_IHtmlControl_That_Is_Of_RelatedArticle_Then_Supports_Content_Returns_True(ArticleRelated article, ArticleRelatedControlRenderer renderer)
        {
            var actual = renderer.SupportsContent(article);

            actual.Should().BeTrue();
        }