summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-04-26 22:17:48 +0100
committerMichael Williamson <mike@zwobble.org>2016-04-26 22:17:48 +0100
commit0e1dd2bfb5f2a346caf66aad8bccf0a69caac760 (patch)
treeb67476a571daaa65bdfbbc9f0b637cfaca06c76a
parent55ce15c0815cd2f703c1fc1b65697fb67799bbc6 (diff)
Add test for inline images
-rw-r--r--dotnet/Mammoth.Tests/DocumentConverterTests.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/dotnet/Mammoth.Tests/DocumentConverterTests.cs b/dotnet/Mammoth.Tests/DocumentConverterTests.cs
index ef65385..30b7646 100644
--- a/dotnet/Mammoth.Tests/DocumentConverterTests.cs
+++ b/dotnet/Mammoth.Tests/DocumentConverterTests.cs
@@ -47,6 +47,13 @@ namespace Mammoth.Tests {
"<p>Below</p>");
}
+ [Fact]
+ public void InlineImagesAreIncludedInOutput() {
+ assertSuccessfulConversion(
+ ConvertToHtml("tiny-picture.docx"),
+ "<p><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAOvgAADr4B6kKxwAAAABNJREFUKFNj/M+ADzDhlWUYqdIAQSwBE8U+X40AAAAASUVORK5CYII=\" /></p>");
+ }
+
private void assertSuccessfulConversion(IResult<string> result, string expectedValue) {
if (result.Warnings.Count > 0) {
throw new XunitException("Unexpected warnings: " + string.Join(", ", result.Warnings));