diff options
Diffstat (limited to 'src/test/java/org/zwobble/mammoth/tests/docx/RelationshipsTests.java')
| -rw-r--r-- | src/test/java/org/zwobble/mammoth/tests/docx/RelationshipsTests.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/java/org/zwobble/mammoth/tests/docx/RelationshipsTests.java b/src/test/java/org/zwobble/mammoth/tests/docx/RelationshipsTests.java new file mode 100644 index 0000000..f9a7672 --- /dev/null +++ b/src/test/java/org/zwobble/mammoth/tests/docx/RelationshipsTests.java @@ -0,0 +1,19 @@ +package org.zwobble.mammoth.tests.docx; + +import org.junit.Test; +import org.zwobble.mammoth.internal.docx.Relationships; + +import static org.junit.Assert.assertEquals; +import static org.zwobble.mammoth.internal.util.MammothMaps.map; +import static org.zwobble.mammoth.tests.util.MammothAsserts.assertThrows; + +public class RelationshipsTests { + @Test + public void exceptionIsThrownIfRelationshipCannotBeFound() { + Relationships relationships = new Relationships(map()); + RuntimeException exception = assertThrows( + RuntimeException.class, + () -> relationships.findRelationshipById("rId5")); + assertEquals("Could not find relationship 'rId5'", exception.getMessage()); + } +} |
