org.junit.rules.TestRule
public final class BackgroundTestRule extends Object implements org.junit.rules.TestRule
BackgroundTestRule.BackgroundTest
.
This is useful for testing logic that explicitly forbids being called on the main thread.
Example usage:
{@code
Modifier and Type | Class | Description |
---|---|---|
static interface |
BackgroundTestRule.BackgroundTest |
Annotation for test methods that need to be executed in a background thread.
|
Constructor | Description |
---|---|
BackgroundTestRule() |
Modifier and Type | Method | Description |
---|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |