类 AssumptionViolatedException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.junit.internal.AssumptionViolatedException
- 所有已实现的接口:
Serializable
,SelfDescribing
- 直接已知子类:
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.
构造器概要
构造器 构造器 说明 AssumptionViolatedException(Object value, Matcher<?> matcher)
已过时。Please useAssumptionViolatedException
instead.AssumptionViolatedException(String assumption)
已过时。Please useAssumptionViolatedException
instead.AssumptionViolatedException(String assumption, boolean hasValue, Object value, Matcher<?> matcher)
已过时。Please useAssumptionViolatedException
instead.AssumptionViolatedException(String assumption, Object value, Matcher<?> matcher)
已过时。Please useAssumptionViolatedException
instead.AssumptionViolatedException(String assumption, Throwable e)
已过时。Please useAssumptionViolatedException
instead.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
describeTo(Description description)
Generates a description of the object.String
getMessage()
构造器详细资料
AssumptionViolatedException
@Deprecated public AssumptionViolatedException(String assumption, boolean hasValue, Object value, Matcher<?> matcher)
已过时。Please useAssumptionViolatedException
instead.
AssumptionViolatedException
@Deprecated public AssumptionViolatedException(Object value, Matcher<?> matcher)
已过时。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)
已过时。Please useAssumptionViolatedException
instead.An assumption exception with the given value (String or Throwable) and an additional failingMatcher
.
AssumptionViolatedException
@Deprecated public AssumptionViolatedException(String assumption)
已过时。Please useAssumptionViolatedException
instead.An assumption exception with the given message only.
AssumptionViolatedException
@Deprecated public AssumptionViolatedException(String assumption, Throwable e)
已过时。Please useAssumptionViolatedException
instead.An assumption exception with the given message and a cause.
方法详细资料
getMessage
public String getMessage()
- 覆盖:
getMessage
在类中Throwable
describeTo
public void describeTo(Description description)
从接口复制的说明: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.- 指定者:
describeTo
在接口中SelfDescribing
- 参数:
description
- The description to be built or appended to.