diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-04-26 22:17:13 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-04-26 22:17:13 +0100 |
| commit | 55ce15c0815cd2f703c1fc1b65697fb67799bbc6 (patch) | |
| tree | d07fbc78756f82a033700b53cb2705d5e3e82ba2 /dotnet | |
| parent | 8a693ba3c705901dca9b92bc01af76244cc0aaf1 (diff) | |
Add test for tables
Diffstat (limited to 'dotnet')
| -rw-r--r-- | dotnet/Mammoth.Tests/DocumentConverterTests.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/dotnet/Mammoth.Tests/DocumentConverterTests.cs b/dotnet/Mammoth.Tests/DocumentConverterTests.cs index ef216f3..ef65385 100644 --- a/dotnet/Mammoth.Tests/DocumentConverterTests.cs +++ b/dotnet/Mammoth.Tests/DocumentConverterTests.cs @@ -33,6 +33,20 @@ namespace Mammoth.Tests { "<p></p>"); } + // TODO: simple list + + [Fact] + public void WordTablesAreConvertedToHtmlTables() { + assertSuccessfulConversion( + ConvertToHtml("tables.docx"), + "<p>Above</p>" + + "<table>" + + "<tr><td><p>Top left</p></td><td><p>Top right</p></td></tr>" + + "<tr><td><p>Bottom left</p></td><td><p>Bottom right</p></td></tr>" + + "</table>" + + "<p>Below</p>"); + } + private void assertSuccessfulConversion(IResult<string> result, string expectedValue) { if (result.Warnings.Count > 0) { throw new XunitException("Unexpected warnings: " + string.Join(", ", result.Warnings)); |
