Class ExceptionMatcher<T extends java.lang.Throwable>

  • Type Parameters:
    T - expected exception type
    All Implemented Interfaces:
    org.hamcrest.Matcher<T>, org.hamcrest.SelfDescribing

    @Deprecated
    public class ExceptionMatcher<T extends java.lang.Throwable>
    extends org.hamcrest.TypeSafeMatcher<T>
    Deprecated.
    Matches a given exception type with an optional additional message matcher.
    • Constructor Summary

      Constructors 
      Constructor Description
      ExceptionMatcher​(java.lang.Class<T> expectedType)
      Deprecated.
      Will match Throwable instances of the given type.
      ExceptionMatcher​(java.lang.Class<T> expectedType, org.hamcrest.Matcher<java.lang.String> messageMatcher)
      Deprecated.
      Will match Throwable instances of the given type and if its message matches the given String Matcher.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void describeTo​(org.hamcrest.Description description)
      Deprecated.
       
      protected boolean matchesSafely​(T item)
      Deprecated.
       
      • Methods inherited from class org.hamcrest.TypeSafeMatcher

        describeMismatch, describeMismatchSafely, matches
      • Methods inherited from class org.hamcrest.BaseMatcher

        _dont_implement_Matcher___instead_extend_BaseMatcher_, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ExceptionMatcher

        public ExceptionMatcher​(java.lang.Class<T> expectedType)
        Deprecated.
        Will match Throwable instances of the given type. See also TypeSafeMatcher for details.
        Parameters:
        expectedType - expected child class of Throwable
      • ExceptionMatcher

        public ExceptionMatcher​(java.lang.Class<T> expectedType,
                                org.hamcrest.Matcher<java.lang.String> messageMatcher)
        Deprecated.
        Will match Throwable instances of the given type and if its message matches the given String Matcher. See also TypeSafeMatcher for details.
        Parameters:
        expectedType - expected child class of Throwable
        messageMatcher - matcher for exception message
    • Method Detail

      • matchesSafely

        protected boolean matchesSafely​(T item)
        Deprecated.
        Specified by:
        matchesSafely in class org.hamcrest.TypeSafeMatcher<T extends java.lang.Throwable>
      • describeTo

        public void describeTo​(org.hamcrest.Description description)
        Deprecated.