From 29f0f5e881220626c5eb6a270ed73a653176660b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 26 Apr 2016 23:29:02 +0100 Subject: Add test for ExtractRawText --- dotnet/Mammoth.Tests/DocumentConverterTests.cs | 7 +++++++ 1 file changed, 7 insertions(+) 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 { "

"); } + [Fact] + public void CanExtractRawTextFromFile() { + assertSuccessfulConversion( + new DocumentConverter().ExtractRawText(TestFilePath("simple-list.docx")), + "Apple\n\nBanana\n\n"); + } + private void assertSuccessfulConversion(IResult result, string expectedValue) { if (result.Warnings.Count > 0) { throw new XunitException("Unexpected warnings: " + string.Join(", ", result.Warnings)); -- cgit v1.2.3