aboutsummaryrefslogtreecommitdiff
path: root/dotnet/Mammoth.Tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-04-26 23:35:10 +0100
committerMichael Williamson <mike@zwobble.org>2016-04-26 23:35:10 +0100
commit5506c630f1974595a4fb23b0d7acdb163d96d807 (patch)
tree2ed30d080ae0c56b4307076998b826bee88d6a1d /dotnet/Mammoth.Tests
parent29f0f5e881220626c5eb6a270ed73a653176660b (diff)
Implement InMemoryDocxFile
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));