AssumptionViolatedException (JUnit API)
Date: 2018-08-04

org.junit

## Class AssumptionViolatedException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.junit.internal.AssumptionViolatedException
        - - org.junit.AssumptionViolatedException

- All Implemented Interfaces:
    java.io.Serializable, org.hamcrest.SelfDescribing

      public class AssumptionViolatedException
      extends org.junit.internal.AssumptionViolatedException

  An exception class used to implement assumptions (state in which a given test is meaningful and should or should not be executed). A test for which an assumption fails should not generate a test case failure.
  Since:
    4.12
  See Also:
    `Assume`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AssumptionViolatedException(java.lang.String message)` An assumption exception with the given message only.
    `AssumptionViolatedException(java.lang.String assumption, java.lang.Throwable t)` An assumption exception with the given message and a cause.
    `AssumptionViolatedException(java.lang.String message, T expected, org.hamcrest.Matcher<T> matcher)` An assumption exception with a message with the given actual value and a matcher describing the expectation that failed.
    `AssumptionViolatedException(T actual, org.hamcrest.Matcher<T> matcher)` An assumption exception with the given actual value and a matcher describing the expectation that failed.

  - ### Method Summary

    - ### Methods inherited from class org.junit.internal.AssumptionViolatedException

      `describeTo, getMessage`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AssumptionViolatedException

          public AssumptionViolatedException(T actual,
                                     org.hamcrest.Matcher<T> matcher)

      An assumption exception with the given actual value and a matcher describing the expectation that failed.

    - #### AssumptionViolatedException

          public AssumptionViolatedException(java.lang.String message,
                                     T expected,
                                     org.hamcrest.Matcher<T> matcher)

      An assumption exception with a message with the given actual value and a matcher describing the expectation that failed.

    - #### AssumptionViolatedException

          public AssumptionViolatedException(java.lang.String message)

      An assumption exception with the given message only.

    - #### AssumptionViolatedException

          public AssumptionViolatedException(java.lang.String assumption,
                                     java.lang.Throwable t)

      An assumption exception with the given message and a cause.