diff options
Diffstat (limited to 'dotnet')
| -rw-r--r-- | dotnet/Mammoth.Tests/DocumentConverterTests.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/dotnet/Mammoth.Tests/DocumentConverterTests.cs b/dotnet/Mammoth.Tests/DocumentConverterTests.cs index 5b53685..adfd368 100644 --- a/dotnet/Mammoth.Tests/DocumentConverterTests.cs +++ b/dotnet/Mammoth.Tests/DocumentConverterTests.cs @@ -6,16 +6,23 @@ namespace Mammoth.Tests { [Fact] public void DocxContainingOneParagraphIsConvertedToSingleParagraphElement() { assertSuccessfulConversion( - convertToHtml("single-paragraph.docx"), + ConvertToHtml("single-paragraph.docx"), "<p>Walking on imported air</p>"); } + [Fact] + public void CanReadFilesWithUtf8Bom() { + assertSuccessfulConversion( + ConvertToHtml("utf8-bom.docx"), + "<p>This XML has a byte order mark.</p>"); + } + private void assertSuccessfulConversion(IResult<string> result, string expectedValue) { Assert.Empty(result.Warnings); Assert.Equal(expectedValue, result.Value); } - private IResult<string> convertToHtml(string name) { + private IResult<string> ConvertToHtml(string name) { return new DocumentConverter().ConvertToHtml(TestFilePath(name)); } |
