org.apache.lucene.util

## Class TestRuleIgnoreTestSuites

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

All Implemented Interfaces:
  org.junit.rules.TestRule

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

This rule will cause the suite to be assumption-ignored if the test class implements a given marker interface and a special property is not set.

This is a workaround for problems with certain JUnit containers (IntelliJ) which automatically discover test suites and attempt to run nested classes that we use for testing the test framework itself.

### Nested Class Summary

Nested Classes
`static interface` `TestRuleIgnoreTestSuites.NestedTestSuite` Marker interface for nested suites that should be ignored if executed in stand-alone mode.

### Field Summary

Fields
`static String` `PROPERTY_RUN_NESTED` A boolean system property indicating nested suites should be executed normally.

### Constructor Summary

Constructors
Constructor and Description
`TestRuleIgnoreTestSuites()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`org.junit.runners.model.Statement` `apply(org.junit.runners.model.Statement s, Description d)`
`static boolean` `isRunningNested()` Check if a suite class is running as a nested test.

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

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

### Field Detail

#### PROPERTY_RUN_NESTED

    public static final String PROPERTY_RUN_NESTED

A boolean system property indicating nested suites should be executed normally.

See Also:
  Constant Field Values

### Constructor Detail

#### TestRuleIgnoreTestSuites

    public TestRuleIgnoreTestSuites()

### 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`

#### isRunningNested

    public static boolean isRunningNested()

Check if a suite class is running as a nested test.