From 275ff587231c8a74910a8f63595a7a23481d713f Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 30 May 2017 11:26:21 +0100 Subject: Read target frame on hyperlinks --- .../org/zwobble/mammoth/tests/docx/DocumentMatchers.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/test/java/org/zwobble/mammoth/tests/docx/DocumentMatchers.java') diff --git a/src/test/java/org/zwobble/mammoth/tests/docx/DocumentMatchers.java b/src/test/java/org/zwobble/mammoth/tests/docx/DocumentMatchers.java index 8ecb902..d0a1fe6 100644 --- a/src/test/java/org/zwobble/mammoth/tests/docx/DocumentMatchers.java +++ b/src/test/java/org/zwobble/mammoth/tests/docx/DocumentMatchers.java @@ -90,4 +90,20 @@ public class DocumentMatchers { static Matcher hasHref(String href) { return hasProperty("href", equalTo(Optional.of(href))); } + + static Matcher hasBlankHref() { + return hasProperty("href", equalTo(Optional.empty())); + } + + static Matcher hasAnchor(String anchor) { + return hasProperty("anchor", equalTo(Optional.of(anchor))); + } + + static Matcher hasBlankAnchor() { + return hasProperty("anchor", equalTo(Optional.empty())); + } + + static Matcher hasTargetFrame(String targetFrame) { + return hasProperty("targetFrame", equalTo(Optional.of(targetFrame))); + } } -- cgit v1.2.3