Skip to content

Commit

Permalink
Additional tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKasaku committed Jan 13, 2020
1 parent f18d56f commit 3ca4d0b
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,30 @@ public void NormalParagraphRemains()
tester.AssertParsedHtml("<p>This is a regular paragraph</p>", "<p>This is a regular paragraph</p>");
}

[Test]
public void DefaultReplacementWithMultipleInstances()
{
var tester = new CleanerTester<ConvertStrongParagraphToHeader>();

tester.AssertParsedHtml("<h4>This is already a header!</h4><p><strong>This is really a header!</strong></p>", "<h4>This is already a header!</h4><h4>This is really a header!</h4>");
}

[Test]
public void DefaultReplacementWithMultipleInstancesSomeAlreadyFixed()
{
var tester = new CleanerTester<ConvertStrongParagraphToHeader>();

tester.AssertParsedHtml("<p><strong>This is really a header!</strong></p><p><strong>This is really a header!</strong></p>", "<h4>This is really a header!</h4><h4>This is really a header!</h4>");
}

[Test]
public void DefaultReplacementWithMultipleMixedInstances()
{
var tester = new CleanerTester<ConvertStrongParagraphToHeader>();

tester.AssertParsedHtml("<p><strong>This is really a header!</strong></p><p>This is a regular paragraph</p><p><strong>This is really a header!</strong></p>", "<h4>This is really a header!</h4><p>This is a regular paragraph</p><h4>This is really a header!</h4>");
}

[Test]
public void CustomReplacement()
{
Expand Down

0 comments on commit 3ca4d0b

Please sign in to comment.