Package | Description |
---|---|
org.junit.experimental.theories | |
org.junit.internal.runners.statements | |
org.junit.rules | |
org.junit.runners |
Provides standard
Runner implementations. |
org.junit.runners.parameterized |
Modifier and Type | Class and Description |
---|---|
static class |
Theories.TheoryAnchor |
Modifier and Type | Method and Description |
---|---|
Statement |
Theories.methodBlock(FrameworkMethod method) |
private Statement |
Theories.TheoryAnchor.methodCompletesWithParameters(FrameworkMethod method,
Assignments complete,
java.lang.Object freshInstance) |
Modifier and Type | Class and Description |
---|---|
class |
ExpectException |
class |
Fail |
class |
FailOnTimeout |
class |
InvokeMethod |
class |
RunAfters |
class |
RunBefores |
Modifier and Type | Field and Description |
---|---|
private Statement |
RunAfters.next |
private Statement |
RunBefores.next |
private Statement |
ExpectException.next |
private Statement |
FailOnTimeout.originalStatement |
Modifier and Type | Method and Description |
---|---|
FailOnTimeout |
FailOnTimeout.Builder.build(Statement statement)
Builds a
FailOnTimeout instance using the values in this builder,
wrapping the given statement. |
Constructor and Description |
---|
ExpectException(Statement next,
java.lang.Class<? extends java.lang.Throwable> expected) |
FailOnTimeout(FailOnTimeout.Builder builder,
Statement statement) |
FailOnTimeout(Statement statement,
long timeoutMillis)
Deprecated.
use
FailOnTimeout.builder() instead. |
RunAfters(Statement next,
java.util.List<FrameworkMethod> afters,
java.lang.Object target) |
RunBefores(Statement next,
java.util.List<FrameworkMethod> befores,
java.lang.Object target) |
Modifier and Type | Class and Description |
---|---|
private class |
ExpectedException.ExpectedExceptionStatement |
class |
RunRules
Runs a collection of rules on a statement.
|
Modifier and Type | Field and Description |
---|---|
private Statement |
ExpectedException.ExpectedExceptionStatement.next |
private Statement |
RunRules.statement |
Modifier and Type | Method and Description |
---|---|
Statement |
RuleChain.apply(Statement base,
Description description)
Modifies the method-running
Statement to implement this
test-running rule. |
Statement |
Stopwatch.apply(Statement base,
Description description) |
Statement |
Verifier.apply(Statement base,
Description description) |
Statement |
ExternalResource.apply(Statement base,
Description description) |
Statement |
TestWatcher.apply(Statement base,
Description description) |
Statement |
ExpectedException.apply(Statement base,
Description description) |
Statement |
Timeout.apply(Statement base,
Description description) |
Statement |
DisableOnDebug.apply(Statement base,
Description description) |
Statement |
TestRule.apply(Statement base,
Description description)
Modifies the method-running
Statement to implement this
test-running rule. |
Statement |
TestWatchman.apply(Statement base,
FrameworkMethod method,
java.lang.Object target)
Deprecated.
|
Statement |
MethodRule.apply(Statement base,
FrameworkMethod method,
java.lang.Object target)
Modifies the method-running
Statement to implement an additional
test-running rule. |
private static Statement |
RunRules.applyAll(Statement result,
java.lang.Iterable<TestRule> rules,
Description description) |
protected Statement |
Timeout.createFailOnTimeoutStatement(Statement statement)
Creates a
Statement that will run the given
statement , and timeout the operation based
on the values configured in this rule. |
private Statement |
ExternalResource.statement(Statement base) |
Modifier and Type | Method and Description |
---|---|
Statement |
RuleChain.apply(Statement base,
Description description)
Modifies the method-running
Statement to implement this
test-running rule. |
Statement |
Stopwatch.apply(Statement base,
Description description) |
Statement |
Verifier.apply(Statement base,
Description description) |
Statement |
ExternalResource.apply(Statement base,
Description description) |
Statement |
TestWatcher.apply(Statement base,
Description description) |
Statement |
ExpectedException.apply(Statement base,
Description description) |
Statement |
Timeout.apply(Statement base,
Description description) |
Statement |
DisableOnDebug.apply(Statement base,
Description description) |
Statement |
TestRule.apply(Statement base,
Description description)
Modifies the method-running
Statement to implement this
test-running rule. |
Statement |
TestWatchman.apply(Statement base,
FrameworkMethod method,
java.lang.Object target)
Deprecated.
|
Statement |
MethodRule.apply(Statement base,
FrameworkMethod method,
java.lang.Object target)
Modifies the method-running
Statement to implement an additional
test-running rule. |
private static Statement |
RunRules.applyAll(Statement result,
java.lang.Iterable<TestRule> rules,
Description description) |
protected Statement |
Timeout.createFailOnTimeoutStatement(Statement statement)
Creates a
Statement that will run the given
statement , and timeout the operation based
on the values configured in this rule. |
private Statement |
ExternalResource.statement(Statement base) |
Constructor and Description |
---|
ExpectedExceptionStatement(Statement base) |
RunRules(Statement base,
java.lang.Iterable<TestRule> rules,
Description description) |
Modifier and Type | Method and Description |
---|---|
Statement |
RuleContainer.apply(FrameworkMethod method,
Description description,
java.lang.Object target,
Statement statement)
Applies all the rules ordered accordingly to the specified
statement . |
protected Statement |
ParentRunner.childrenInvoker(RunNotifier notifier)
Returns a
Statement : Call ParentRunner.runChild(Object, RunNotifier)
on each object returned by ParentRunner.getChildren() (subject to any imposed
filter and sort) |
protected Statement |
ParentRunner.classBlock(RunNotifier notifier)
Constructs a
Statement to run all of the tests in the test class. |
protected Statement |
BlockJUnit4ClassRunner.methodBlock(FrameworkMethod method)
Returns a Statement that, when executed, either returns normally if
method passes, or throws an exception if method fails. |
protected Statement |
BlockJUnit4ClassRunner.methodInvoker(FrameworkMethod method,
java.lang.Object test)
|
protected Statement |
BlockJUnit4ClassRunner.possiblyExpectingExceptions(FrameworkMethod method,
java.lang.Object test,
Statement next)
Returns a
Statement : if method 's @Test annotation
has the Test.expected() attribute, return normally only if next
throws an exception of the correct type, and throw an exception
otherwise. |
protected Statement |
ParentRunner.withAfterClasses(Statement statement)
Returns a
Statement : run all non-overridden @AfterClass methods on this class
and superclasses after executing statement ; all AfterClass methods are
always executed: exceptions thrown by previous steps are combined, if
necessary, with exceptions from AfterClass methods into a
MultipleFailureException . |
protected Statement |
BlockJUnit4ClassRunner.withAfters(FrameworkMethod method,
java.lang.Object target,
Statement statement)
Returns a
Statement : run all non-overridden @After
methods on this class and superclasses before running next ; all
After methods are always executed: exceptions thrown by previous steps
are combined, if necessary, with exceptions from After methods into a
MultipleFailureException . |
protected Statement |
ParentRunner.withBeforeClasses(Statement statement)
Returns a
Statement : run all non-overridden @BeforeClass methods on this class
and superclasses before executing statement ; if any throws an
Exception, stop execution and pass the exception on. |
protected Statement |
BlockJUnit4ClassRunner.withBefores(FrameworkMethod method,
java.lang.Object target,
Statement statement)
Returns a
Statement : run all non-overridden @Before
methods on this class and superclasses before running next ; if
any throws an Exception, stop execution and pass the exception on. |
private Statement |
ParentRunner.withClassRules(Statement statement)
|
protected Statement |
ParentRunner.withInterruptIsolation(Statement statement) |
protected Statement |
BlockJUnit4ClassRunner.withPotentialTimeout(FrameworkMethod method,
java.lang.Object test,
Statement next)
Deprecated.
|
private Statement |
BlockJUnit4ClassRunner.withRules(FrameworkMethod method,
java.lang.Object target,
Statement statement) |
Modifier and Type | Method and Description |
---|---|
Statement |
RuleContainer.apply(FrameworkMethod method,
Description description,
java.lang.Object target,
Statement statement)
Applies all the rules ordered accordingly to the specified
statement . |
protected Statement |
BlockJUnit4ClassRunner.possiblyExpectingExceptions(FrameworkMethod method,
java.lang.Object test,
Statement next)
Returns a
Statement : if method 's @Test annotation
has the Test.expected() attribute, return normally only if next
throws an exception of the correct type, and throw an exception
otherwise. |
protected void |
ParentRunner.runLeaf(Statement statement,
Description description,
RunNotifier notifier)
Runs a
Statement that represents a leaf (aka atomic) test. |
protected Statement |
ParentRunner.withAfterClasses(Statement statement)
Returns a
Statement : run all non-overridden @AfterClass methods on this class
and superclasses after executing statement ; all AfterClass methods are
always executed: exceptions thrown by previous steps are combined, if
necessary, with exceptions from AfterClass methods into a
MultipleFailureException . |
protected Statement |
BlockJUnit4ClassRunner.withAfters(FrameworkMethod method,
java.lang.Object target,
Statement statement)
Returns a
Statement : run all non-overridden @After
methods on this class and superclasses before running next ; all
After methods are always executed: exceptions thrown by previous steps
are combined, if necessary, with exceptions from After methods into a
MultipleFailureException . |
protected Statement |
ParentRunner.withBeforeClasses(Statement statement)
Returns a
Statement : run all non-overridden @BeforeClass methods on this class
and superclasses before executing statement ; if any throws an
Exception, stop execution and pass the exception on. |
protected Statement |
BlockJUnit4ClassRunner.withBefores(FrameworkMethod method,
java.lang.Object target,
Statement statement)
Returns a
Statement : run all non-overridden @Before
methods on this class and superclasses before running next ; if
any throws an Exception, stop execution and pass the exception on. |
private Statement |
ParentRunner.withClassRules(Statement statement)
|
protected Statement |
ParentRunner.withInterruptIsolation(Statement statement) |
protected Statement |
BlockJUnit4ClassRunner.withPotentialTimeout(FrameworkMethod method,
java.lang.Object test,
Statement next)
Deprecated.
|
private Statement |
BlockJUnit4ClassRunner.withRules(FrameworkMethod method,
java.lang.Object target,
Statement statement) |
Modifier and Type | Class and Description |
---|---|
private class |
BlockJUnit4ClassRunnerWithParameters.RunAfterParams |
private class |
BlockJUnit4ClassRunnerWithParameters.RunBeforeParams |
Modifier and Type | Method and Description |
---|---|
protected Statement |
BlockJUnit4ClassRunnerWithParameters.classBlock(RunNotifier notifier) |
private Statement |
BlockJUnit4ClassRunnerWithParameters.withAfterParams(Statement statement) |
private Statement |
BlockJUnit4ClassRunnerWithParameters.withBeforeParams(Statement statement) |
Modifier and Type | Method and Description |
---|---|
private Statement |
BlockJUnit4ClassRunnerWithParameters.withAfterParams(Statement statement) |
private Statement |
BlockJUnit4ClassRunnerWithParameters.withBeforeParams(Statement statement) |
Constructor and Description |
---|
RunAfterParams(Statement next,
java.util.List<FrameworkMethod> afters) |
RunBeforeParams(Statement next,
java.util.List<FrameworkMethod> befores) |