类 Failure

  • 所有已实现的接口:
    Serializable

    public class Failure
    extends Object
    implements Serializable
    A Failure holds a description of the failed test and the exception that was thrown while running it. In most cases the Description will be of a single test. However, if problems are encountered while constructing the test (for example, if a BeforeClass method is not static), it may describe something other than a single test.
    从以下版本开始:
    4.0
    另请参阅:
    序列化表格
    • 构造器详细资料

      • Failure

        public Failure​(Description description,
                       Throwable thrownException)
        Constructs a Failure with the given description and exception.
        参数:
        description - a Description of the test that failed
        thrownException - the exception that was thrown while running the test