aboutsummaryrefslogtreecommitdiff
path: root/dotnet/Mammoth.Tests
diff options
context:
space:
mode:
Diffstat (limited to 'dotnet/Mammoth.Tests')
-rw-r--r--dotnet/Mammoth.Tests/DocumentConverterTests.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/dotnet/Mammoth.Tests/DocumentConverterTests.cs b/dotnet/Mammoth.Tests/DocumentConverterTests.cs
index d94cb2d..5aec793 100644
--- a/dotnet/Mammoth.Tests/DocumentConverterTests.cs
+++ b/dotnet/Mammoth.Tests/DocumentConverterTests.cs
@@ -68,6 +68,15 @@ namespace Mammoth.Tests {
"Apple\n\nBanana\n\n");
}
+ [Fact]
+ public void CanExtractRawTextFromStream() {
+ using (var file = File.OpenRead(TestFilePath("simple-list.docx"))) {
+ assertSuccessfulConversion(
+ new DocumentConverter().ExtractRawText(file),
+ "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));