diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-04-26 23:29:02 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-04-26 23:29:02 +0100 |
| commit | 29f0f5e881220626c5eb6a270ed73a653176660b (patch) | |
| tree | b96568115f5eefed0f8264079b40809656fbae35 | |
| parent | 789ac98fa258692a25eaf5f380088479caa389ac (diff) | |
Add test for ExtractRawText
| -rw-r--r-- | dotnet/Mammoth.Tests/DocumentConverterTests.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dotnet/Mammoth.Tests/DocumentConverterTests.cs b/dotnet/Mammoth.Tests/DocumentConverterTests.cs index 1e07f99..d94cb2d 100644 --- a/dotnet/Mammoth.Tests/DocumentConverterTests.cs +++ b/dotnet/Mammoth.Tests/DocumentConverterTests.cs @@ -61,6 +61,13 @@ namespace Mammoth.Tests { "<p><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAOvgAADr4B6kKxwAAAABNJREFUKFNj/M+ADzDhlWUYqdIAQSwBE8U+X40AAAAASUVORK5CYII=\" /></p>"); } + [Fact] + public void CanExtractRawTextFromFile() { + assertSuccessfulConversion( + new DocumentConverter().ExtractRawText(TestFilePath("simple-list.docx")), + "Apple\n\nBanana\n\n"); + } + private void assertSuccessfulConversion(IResult<string> result, string expectedValue) { if (result.Warnings.Count > 0) { throw new XunitException("Unexpected warnings: " + string.Join(", ", result.Warnings)); |
