Class IsThrowingMatcher

java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeMatcher<Runnable>
ee.jakarta.tck.ws.rs.common.matchers.IsThrowingMatcher
All Implemented Interfaces:
org.hamcrest.Matcher<Runnable>, org.hamcrest.SelfDescribing

public class IsThrowingMatcher extends org.hamcrest.TypeSafeMatcher<Runnable>
Custom Hamcrest Matcher to assert if the given exception is thrown.
Author:
Jeremias Weber
  • Constructor Details

    • IsThrowingMatcher

      public IsThrowingMatcher(Class<? extends Exception> expected)
  • Method Details

    • isThrowing

      public static org.hamcrest.Matcher<Runnable> isThrowing(Class<? extends Exception> expected)
    • matchesSafely

      public boolean matchesSafely(Runnable action)
      Specified by:
      matchesSafely in class org.hamcrest.TypeSafeMatcher<Runnable>
    • describeTo

      public void describeTo(org.hamcrest.Description description)