blob: 3c32852734531ce9af3237973331577d64e21781 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package org.zwobble.mammoth.tests.docx;
import org.junit.jupiter.api.Test;
import org.zwobble.mammoth.internal.docx.Relationships;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.zwobble.mammoth.tests.util.MammothAsserts.assertThrows;
public class RelationshipsTests {
@Test
public void exceptionIsThrownIfRelationshipCannotBeFound() {
Relationships relationships = Relationships.EMPTY;
RuntimeException exception = assertThrows(
RuntimeException.class,
() -> relationships.findTargetByRelationshipId("rId5"));
assertEquals("Could not find relationship 'rId5'", exception.getMessage());
}
}
|