Skip to content

Commit

Permalink
tests amended
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria committed Oct 9, 2024
1 parent ed88e66 commit 1f19629
Showing 1 changed file with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ public void List_Does_Not_Render_When_No_Items()
}

[Test]
public void List_Renders()
public void Unordered_List_Renders()
{
// arrange
var stringWriter = new StringWriter();
var list = new List()
{
NodeType = "unordered-list",
Content = new List<IContent>
{
new ListItem
Expand Down Expand Up @@ -91,12 +92,13 @@ public void List_Renders()
}

[Test]
public void List_Only_Renders_Paragraphs()
public void Ordered_List_Renders()
{
// arrange
var stringWriter = new StringWriter();
var list = new List()
{
NodeType = "ordered-list",
Content = new List<IContent>
{
new ListItem
Expand All @@ -113,7 +115,10 @@ public void List_Only_Renders_Paragraphs()
{
Content = new List<IContent>
{
new Text()
new Paragraph
{
Content = new List<IContent> { new Hyperlink() }
}
}

}
Expand All @@ -128,19 +133,19 @@ public void List_Only_Renders_Paragraphs()
var actual = stringWriter.ToString();

// assert
actual.Should().Be("<ul class=\"HtmlEncode[[govuk-list govuk-list--bullet]]\"><li>AAA</li></ul>");
actual.Should().Be("<ol class=\"HtmlEncode[[govuk-list govuk-list--number]]\"><li>AAA</li><li>BBB</li></ol>");
}

[Test]
public void Numbered_List_Renders()
public void List_Only_Renders_Paragraphs()
{
// arrange
var stringWriter = new StringWriter();
var list = new List()
{
NodeType = "ordered-list",
NodeType = "unordered-list",
Content = new List<IContent>
{
{
new ListItem
{
Content = new List<IContent>
Expand All @@ -155,10 +160,7 @@ public void Numbered_List_Renders()
{
Content = new List<IContent>
{
new Paragraph
{
Content = new List<IContent> { new Hyperlink() }
}
new Text()
}

}
Expand All @@ -173,7 +175,7 @@ public void Numbered_List_Renders()
var actual = stringWriter.ToString();

// assert
actual.Should().Be("<ol class=\"HtmlEncode[[govuk-list govuk-list--number]]\"><li>AAA</li><li>BBB</li></ol>");
actual.Should().Be("<ul class=\"HtmlEncode[[govuk-list govuk-list--bullet]]\"><li>AAA</li></ul>");
}

}

0 comments on commit 1f19629

Please sign in to comment.