Package org.junit

Class AssumptionViolatedException

  • All Implemented Interfaces:
    Serializable, org.hamcrest.SelfDescribing

    public class AssumptionViolatedException
    extends 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 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​(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​(String message)
        An assumption exception with the given message only.
      • AssumptionViolatedException

        public AssumptionViolatedException​(String message,
                                           Throwable t)
        An assumption exception with the given message and a cause.