@@ -1716,7 +1716,7 @@ public static org.hamcrest.Matcher<org.w3c.dom.Node> hasXPath(java.lang.String x
1716
1716
* Creates a {@link Throws} object that matches a throwable according to the given throwable matcher.
1717
1717
* This can be used with the {@link MatcherAssert#assertThat(String, Executable, Throws)} family of methods.
1718
1718
* For example:
1719
- * <pre>assertThat(() -> methodCallThatThrowsException(), doesThrow(withMessage("file not found")))</pre>
1719
+ * <pre>assertThat(() -> methodCallThatThrowsException(), doesThrow(withMessage("file not found")))</pre>
1720
1720
*
1721
1721
* @param throwableMatcher
1722
1722
* the matcher for the throwable to match, which must not be {@code null}
@@ -1729,7 +1729,7 @@ public static <T extends Throwable> Throws<T> doesThrow(Matcher<? super Throwabl
1729
1729
* Creates a {@link Throws} object that matches a throwable of the given type.
1730
1730
* This can be used with the {@link MatcherAssert#assertThat(String, Executable, Throws)} family of methods.
1731
1731
* For example:
1732
- * <pre>assertThat(() -> methodCallThatThrowsIOException(), throwsInstanceOf(IOException.class))</pre>
1732
+ * <pre>assertThat(() -> methodCallThatThrowsIOException(), throwsInstanceOf(IOException.class))</pre>
1733
1733
* This is shorthand for {@code doesThrow(instanceOf(MyThrowable.class))}, to be used as equivalent for JUnit 5's
1734
1734
* {@code assertThrows(MyThrowable.class, () -> {})}.
1735
1735
*
@@ -1744,7 +1744,7 @@ public static <T extends Throwable> Throws<T> throwsInstanceOf(Class<T> throwabl
1744
1744
* Creates a matcher that matches a throwable by matching its message.
1745
1745
* This can be used with the {@link MatcherAssert#assertThat(String, Executable, Throws)} family of methods.
1746
1746
* For example:
1747
- * <pre>assertThat(() -> methodCallThatThrowsException(), doesThrow(withMessage(startsWith("file not found"))))</pre>
1747
+ * <pre>assertThat(() -> methodCallThatThrowsException(), doesThrow(withMessage(startsWith("file not found"))))</pre>
1748
1748
*
1749
1749
* @param messageMatcher
1750
1750
* the matcher to match the throwable's message with, which must not be {@code null}
@@ -1757,7 +1757,7 @@ public static <T extends Throwable> Matcher<T> withMessage(Matcher<String> messa
1757
1757
* Creates a matcher that matches a throwable by its message.
1758
1758
* This can be used with the {@link MatcherAssert#assertThat(String, Executable, Throws)} family of methods.
1759
1759
* For example:
1760
- * <pre>assertThat(() -> methodCallThatThrowsException(), doesThrow(withMessage("message")))</pre>
1760
+ * <pre>assertThat(() -&; methodCallThatThrowsException(), doesThrow(withMessage("message")))</pre>
1761
1761
* This is shorthand for {@code doesThrow(withMessage(equalTo("message")))}.
1762
1762
*
1763
1763
* @param messageToMatch
@@ -1771,7 +1771,7 @@ public static <T extends Throwable> Matcher<T> withMessage(String messageToMatch
1771
1771
* Creates a matcher that matches an outer throwable by matching its inner cause.
1772
1772
* This can be used with the {@link MatcherAssert#assertThat(String, Executable, Throws)} family of methods.
1773
1773
* For example:
1774
- * <pre>assertThat(() -> methodCallThatThrowsInvocationTargetException(), doesThrow(becauseOf(instanceOf(IOException.class))))</pre>
1774
+ * <pre>assertThat(() -> methodCallThatThrowsInvocationTargetException(), doesThrow(becauseOf(instanceOf(IOException.class))))</pre>
1775
1775
*
1776
1776
* @param causeMatcher
1777
1777
* the matcher to matcher the outer throwable's inner cause with, which must not be {@code null}
0 commit comments