Skip to content

Commit

Permalink
Improve code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
onizet committed Oct 13, 2024
1 parent e112b9a commit 8e00c09
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/HtmlToOpenXml.Tests/ParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,13 @@ public void ProvidedMainPartDocument_WithNull_ShouldBeAssigned()
var elements = new HtmlConverter(mainPart).Parse("Placeholder");
Assert.That(elements, Is.Not.Empty);
}

[Test(Description = "Provided BaseImageUrl must be an absolute uri")]
public void ProvidedBaseImageUrl_WithRelativeUrl_ShouldFail()
{
Assert.Throws<ArgumentException>(() => new HtmlConverter(mainPart, new IO.DefaultWebRequest {
BaseImageUrl = new Uri("/path", UriKind.Relative)
}));
}
}
}

0 comments on commit 8e00c09

Please # to comment.