org.apache.lucene.util

## Class TestRuleMarkFailure

- java.lang.Object
- - org.apache.lucene.util.TestRuleMarkFailure

- All Implemented Interfaces:
    org.junit.rules.TestRule

      public final class TestRuleMarkFailure
      extends Object
      implements org.junit.rules.TestRule

  A rule for marking failed tests and suites.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestRuleMarkFailure(TestRuleMarkFailure... chained)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.junit.runners.model.Statement` | `apply(org.junit.runners.model.Statement s, Description d)`
    `boolean` | `hadFailures()` Check if this object had any marked failures.
    `static boolean` | `isAssumption(Throwable t)` Is a given exception (or a MultipleFailureException) an `AssumptionViolatedException`?
    `void` | `markFailed()` Taints this object and any chained as having failures.
    `boolean` | `wasSuccessful()` Check if this object was successful (the opposite of `hadFailures()`).

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

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

- - ### Constructor Detail

    - #### TestRuleMarkFailure

          public TestRuleMarkFailure(TestRuleMarkFailure... chained)

  - ### Method Detail

    - #### apply

          public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement s,
                                                         Description d)

      Specified by:
        `apply` in interface `org.junit.rules.TestRule`

    - #### isAssumption

          public static boolean isAssumption(Throwable t)

      Is a given exception (or a MultipleFailureException) an `AssumptionViolatedException`?

    - #### markFailed

          public void markFailed()

      Taints this object and any chained as having failures.

    - #### hadFailures

          public boolean hadFailures()

      Check if this object had any marked failures.

    - #### wasSuccessful

          public boolean wasSuccessful()

      Check if this object was successful (the opposite of `hadFailures()`).

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.