Skip to content

Commit ff873c5

Browse files
committed
Add WIP test for converting single-paragraph document
1 parent 4d6eb0a commit ff873c5

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/test/java/org/zwobble/mammoth/tests/MammothTests.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.zwobble.mammoth.tests;
22

3+
import org.junit.Ignore;
34
import org.junit.Test;
45
import org.zwobble.mammoth.Mammoth;
56

@@ -11,7 +12,15 @@
1112
public class MammothTests {
1213
@Test
1314
public void emptyParagraphsAreIgnoredByDefault() {
14-
assertThat(convertToHtml("/test-data/empty.docx"), is(""));
15+
assertThat(convertToHtml("empty.docx"), is(""));
16+
}
17+
18+
@Test
19+
@Ignore("WIP")
20+
public void docxContainingOneParagraphIsConvertedToSingleParagraphElement() {
21+
assertThat(
22+
convertToHtml("single-paragraph.docx"),
23+
is("<p>Walking on imported air</p>"));
1524
}
1625

1726
private String convertToHtml(String name) {

src/test/java/org/zwobble/mammoth/tests/TestData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
public class TestData {
77
public static InputStream stream(String name) {
88
try {
9-
return TestData.class.getResource(name).openStream();
9+
return TestData.class.getResource("/test-data/" + name).openStream();
1010
} catch (IOException exception) {
1111
throw new RuntimeException(exception);
1212
}

0 commit comments

Comments
 (0)