@Test public void test_syntax() { RuntimeException r = new RuntimeException("a", new RuntimeException("b")); assertThat(r, causedBy(RuntimeException.class)); Object o = r; assertThat(o, is(throwable(causedBy(RuntimeException.class)))); }
public CausedBy(boolean direct, Matcher<? super Throwable> m) { super(Throwable.class); this.direct = direct; this.throwableMatcher = m; }
CausedBy extends TypesafeNestedResultMatcher<Throwable> { public CausedBy(boolean direct, Matcher<? super Throwable> m) { super(Throwable.class); this.direct = direct; this.throwableMatcher = m; } }
CausedBy extends TypesafeNestedResultMatcher<Throwable> { public CausedBy(boolean direct, Matcher<? super Throwable> m) { super(Throwable.class); this.direct = direct; this.throwableMatcher = m; } CausedBy(boolean direct, Matcher<? super Throwable> m); }
CausedBy extends TypesafeNestedResultMatcher<Throwable> { public CausedBy(boolean direct, Matcher<? super Throwable> m) { super(Throwable.class); this.direct = direct; this.throwableMatcher = m; } CausedBy(boolean direct, Matcher<? super Throwable> m); @Override int getDescriptionPrecedence(); @Override void describeTo(Description description); @Factory static CausedBy causedBy(Matcher<? super Throwable> matcher); @Factory static CausedBy causedBy(Class<? extends Throwable> clazz); @Factory static CausedBy causedBy(String message); @Factory static CausedBy causedBy(Class<? extends Throwable> clazz, String message); @Factory static CausedBy causedBy(Class<? extends Throwable> clazz, Matcher<? super Throwable> matcher); @Factory static CausedBy causedBy(Class<? extends Throwable> clazz, String message, Matcher<? super Throwable> matcher); @Factory static CausedBy directlyCausedBy(Matcher<? super Throwable> matcher); @Factory static CausedBy directlyCausedBy(Class<? extends Throwable> clazz); @Factory static CausedBy directlyCausedBy(Class<? extends Throwable> clazz, String message); @Factory static CausedBy directlyCausedBy(Class<? extends Throwable> clazz, Matcher<? super Throwable> matcher); @Factory static CausedBy directlyCausedBy(Class<? extends Throwable> clazz, String message, Matcher<? super Throwable> matcher); }
CausedBy extends TypesafeNestedResultMatcher<Throwable> { public CausedBy(boolean direct, Matcher<? super Throwable> m) { super(Throwable.class); this.direct = direct; this.throwableMatcher = m; } CausedBy(boolean direct, Matcher<? super Throwable> m); @Override int getDescriptionPrecedence(); @Override void describeTo(Description description); @Factory static CausedBy causedBy(Matcher<? super Throwable> matcher); @Factory static CausedBy causedBy(Class<? extends Throwable> clazz); @Factory static CausedBy causedBy(String message); @Factory static CausedBy causedBy(Class<? extends Throwable> clazz, String message); @Factory static CausedBy causedBy(Class<? extends Throwable> clazz, Matcher<? super Throwable> matcher); @Factory static CausedBy causedBy(Class<? extends Throwable> clazz, String message, Matcher<? super Throwable> matcher); @Factory static CausedBy directlyCausedBy(Matcher<? super Throwable> matcher); @Factory static CausedBy directlyCausedBy(Class<? extends Throwable> clazz); @Factory static CausedBy directlyCausedBy(Class<? extends Throwable> clazz, String message); @Factory static CausedBy directlyCausedBy(Class<? extends Throwable> clazz, Matcher<? super Throwable> matcher); @Factory static CausedBy directlyCausedBy(Class<? extends Throwable> clazz, String message, Matcher<? super Throwable> matcher);  }