Package org.junit.internal
Class AssumptionViolatedException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.junit.internal.AssumptionViolatedException
- All Implemented Interfaces:
Serializable
,SelfDescribing
- Direct Known Subclasses:
AssumptionViolatedException
public class AssumptionViolatedException extends RuntimeException implements SelfDescribing
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.- See Also:
Assume
, Serialized Form
Constructor Summary
Constructors Constructor Description AssumptionViolatedException(Object value, Matcher<?> matcher)
Deprecated.Please useAssumptionViolatedException
instead.AssumptionViolatedException(String assumption)
Deprecated.Please useAssumptionViolatedException
instead.AssumptionViolatedException(String assumption, boolean hasValue, Object value, Matcher<?> matcher)
Deprecated.Please useAssumptionViolatedException
instead.AssumptionViolatedException(String assumption, Object value, Matcher<?> matcher)
Deprecated.Please useAssumptionViolatedException
instead.AssumptionViolatedException(String assumption, Throwable e)
Deprecated.Please useAssumptionViolatedException
instead.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
describeTo(Description description)
Generates a description of the object.String
getMessage()
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Constructor Detail
AssumptionViolatedException
@Deprecated public AssumptionViolatedException(String assumption, boolean hasValue, Object value, Matcher<?> matcher)
Deprecated.Please useAssumptionViolatedException
instead.
AssumptionViolatedException
@Deprecated public AssumptionViolatedException(Object value, Matcher<?> matcher)
Deprecated.Please useAssumptionViolatedException
instead.An assumption exception with the given value (String or Throwable) and an additional failingMatcher
.
AssumptionViolatedException
@Deprecated public AssumptionViolatedException(String assumption, Object value, Matcher<?> matcher)
Deprecated.Please useAssumptionViolatedException
instead.An assumption exception with the given value (String or Throwable) and an additional failingMatcher
.
AssumptionViolatedException
@Deprecated public AssumptionViolatedException(String assumption)
Deprecated.Please useAssumptionViolatedException
instead.An assumption exception with the given message only.
AssumptionViolatedException
@Deprecated public AssumptionViolatedException(String assumption, Throwable e)
Deprecated.Please useAssumptionViolatedException
instead.An assumption exception with the given message and a cause.
Method Detail
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
describeTo
public void describeTo(Description description)
Description copied from interface:SelfDescribing
Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.- Specified by:
describeTo
in interfaceSelfDescribing
- Parameters:
description
- The description to be built or appended to.