aboutsummaryrefslogtreecommitdiff
path: root/dotnet
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-04-26 22:17:13 +0100
committerMichael Williamson <mike@zwobble.org>2016-04-26 22:17:13 +0100
commit55ce15c0815cd2f703c1fc1b65697fb67799bbc6 (patch)
treed07fbc78756f82a033700b53cb2705d5e3e82ba2 /dotnet
parent8a693ba3c705901dca9b92bc01af76244cc0aaf1 (diff)
Add test for tables
Diffstat (limited to 'dotnet')
-rw-r--r--dotnet/Mammoth.Tests/DocumentConverterTests.cs14
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));