All Classes Interface Summary Class Summary Enum Summary Exception Summary Error Summary Annotation Types Summary
Class |
Description |
ActiveTestSuite |
A TestSuite for active Tests.
|
After |
If you allocate external resources in a Before method you need to release them
after the test runs.
|
AfterClass |
If you allocate expensive external resources in a BeforeClass method you need to release them
after all the tests in the class have run.
|
AllDefaultPossibilitiesBuilder |
|
AllMembersSupplier |
Supplies Theory parameters based on all public members of the target class.
|
AllMembersSupplier.MethodParameterValue |
|
AllTests |
Runner for use with JUnit 3.8.x-style AllTests classes
(those that only implement a static suite()
method).
|
Annotatable |
A model element that may have annotations.
|
AnnotatedBuilder |
The AnnotatedBuilder is a strategy for constructing runners for test class that have been annotated with the
@RunWith annotation.
|
AnnotationsValidator |
An AnnotationsValidator validates all annotations of a test class,
including its annotated fields and methods.
|
AnnotationsValidator.AnnotatableValidator<T extends Annotatable> |
|
AnnotationsValidator.ClassValidator |
|
AnnotationsValidator.FieldValidator |
|
AnnotationsValidator.MethodValidator |
|
AnnotationValidator |
Validates annotations on classes and methods.
|
AnnotationValidatorFactory |
Creates instances of Annotation Validators.
|
ArrayComparisonFailure |
Thrown when two array elements differ
|
Assert |
Deprecated.
|
Assert |
A set of assertion methods useful for writing tests.
|
AssertionFailedError |
Thrown when an assertion failed.
|
Assignments |
A potentially incomplete list of value assignments for a method's formal
parameters
|
Assume |
A set of methods useful for stating assumptions about the conditions in which a test is meaningful.
|
AssumptionViolatedException |
An exception class used to implement assumptions (state in which a given test
is meaningful and should or should not be executed).
|
AssumptionViolatedException |
An exception class used to implement assumptions (state in which a given test
is meaningful and should or should not be executed).
|
BaseTestRunner |
Base class for all test runners.
|
Before |
When writing tests, it is common to find that several tests need similar
objects created before they can run.
|
BeforeClass |
Sometimes several tests need to share computationally expensive setup
(like logging into a database).
|
BlockJUnit4ClassRunner |
Implements the JUnit 4 standard test case class model, as defined by the
annotations in the org.junit package.
|
BlockJUnit4ClassRunnerWithParameters |
|
BlockJUnit4ClassRunnerWithParametersFactory |
|
BooleanSupplier |
|
Categories |
From a given set of test classes, runs only the classes and methods that are
annotated with either the category given with the @IncludeCategory
annotation, or a subtype of that category.
|
Categories.CategoryFilter |
|
Categories.ExcludeCategory |
|
Categories.IncludeCategory |
|
Category |
Marks a test class or test method as belonging to one or more categories of tests.
|
CategoryFilterFactory |
Implementation of FilterFactory for Category filtering.
|
CategoryValidator |
Validates that there are no errors in the use of the Category
annotation.
|
Classes |
Miscellaneous functions dealing with classes.
|
ClassRequest |
|
ClassRoadie |
Deprecated.
|
ClassRule |
Annotates static fields that reference rules or methods that return them.
|
ComparisonCompactor |
|
ComparisonCriteria |
Defines criteria for finding two items "equal enough".
|
ComparisonFailure |
Thrown when an assert equals for Strings failed.
|
ComparisonFailure |
|
ComparisonFailure.ComparisonCompactor |
|
Computer |
Represents a strategy for computing runners and suites.
|
CouldNotReadCoreException |
Thrown when Max cannot read the MaxCore serialization
|
DataPoint |
Annotating an field or method with @DataPoint will cause the field value
or the value returned by the method to be used as a potential parameter for
theories in that class, when run with the
Theories runner.
|
DataPoints |
Annotating an array or iterable-typed field or method with @DataPoints
will cause the values in the array or iterable given to be used as potential
parameters for theories in that class when run with the
Theories runner.
|
Describable |
Represents an object that can describe itself
|
Description |
A Description describes a test which is to be run or has been run.
|
DisableOnDebug |
The DisableOnDebug Rule allows you to label certain rules to be
disabled when debugging.
|
EachTestNotifier |
|
Enclosed |
If you put tests in inner classes, Ant, for example, won't find them.
|
EnumSupplier |
|
ErrorCollector |
The ErrorCollector rule allows execution of a test to continue after the
first problem is found (for example, to collect _all_ the incorrect rows in a
table, and report them all at once):
|
ErrorReportingRunner |
|
ExactComparisonCriteria |
|
ExcludeCategories |
|
ExcludeCategories.ExcludesAny |
|
ExpectedException |
The ExpectedException rule allows you to verify that your code
throws a specific exception.
|
ExpectedExceptionMatcherBuilder |
|
ExpectException |
|
ExternalResource |
A base class for Rules (like TemporaryFolder) that set up an external
resource before a test (a file, socket, server, database connection, etc.),
and guarantee to tear it down afterward:
|
Fail |
|
FailedBefore |
Deprecated.
|
FailOnTimeout |
|
FailOnTimeout.Builder |
|
Failure |
A Failure holds a description of the failed test and the
exception that was thrown while running it.
|
FailureList |
|
Filter |
The canonical case of filtering is when you want to run a single test method in a class.
|
Filterable |
Runners that allow filtering should implement this interface.
|
FilterFactories |
|
FilterFactory |
Extend this class to create a factory that creates Filter .
|
FilterFactory.FilterNotCreatedException |
Exception thrown if the Filter cannot be created.
|
FilterFactoryParams |
|
FilterRequest |
|
FixMethodOrder |
This class allows the user to choose the order of execution of the methods within a test class.
|
FrameworkField |
Represents a field on a test class (currently used only for Rules in
BlockJUnit4ClassRunner , but custom runners can make other uses)
|
FrameworkMember<T extends FrameworkMember<T>> |
|
FrameworkMethod |
Represents a method on a test class to be invoked at the appropriate point in
test execution.
|
FromDataPoints |
Annotating a parameter of a @Theory method with @FromDataPoints will limit the
datapoints considered as potential values for that parameter to just the
DataPoints with the given
name.
|
Ignore |
Sometimes you want to temporarily disable a test or a group of tests.
|
IgnoredBuilder |
|
IgnoredClassRunner |
|
IncludeCategories |
|
IncludeCategories.IncludesAny |
|
InexactComparisonCriteria |
|
InitializationError |
Deprecated. |
InitializationError |
Represents one or more problems encountered while initializing a Runner
|
InvokeMethod |
|
JUnit38ClassRunner |
|
JUnit38ClassRunner.OldTestClassAdaptingListener |
|
JUnit3Builder |
|
JUnit4 |
Aliases the current default JUnit 4 class runner, for future-proofing.
|
JUnit4Builder |
|
JUnit4ClassRunner |
Deprecated.
|
JUnit4TestAdapter |
|
JUnit4TestAdapterCache |
|
JUnit4TestCaseFacade |
|
JUnitCommandLineParseResult |
|
JUnitCommandLineParseResult.CommandLineParserError |
Exception used if there's a problem parsing the command line.
|
JUnitCore |
JUnitCore is a facade for running tests.
|
JUnitMatchers |
Convenience import class: these are useful matchers for use with the assertThat method, but they are
not currently included in the basic CoreMatchers class from hamcrest.
|
JUnitSystem |
|
MaxCore |
A replacement for JUnitCore, which keeps track of runtime and failure history, and reorders tests
to maximize the chances that a failing test occurs early in the test run.
|
MaxHistory |
Stores a subset of the history of each test:
Last failure timestamp
Duration of last execution
|
MethodRoadie |
Deprecated.
|
MethodRule |
A MethodRule is an alteration in how a test method is run and reported.
|
MethodSorter |
|
MethodSorters |
Sort the methods into a specified execution order.
|
MethodValidator |
Deprecated.
|
MultipleFailureException |
Deprecated. |
MultipleFailureException |
Collects multiple Throwable s into one exception.
|
NoGenericTypeParametersValidator |
|
NoTestsRemainException |
Thrown when a filter removes all tests from a runner.
|
NullBuilder |
|
ParallelComputer |
|
Parameterized |
The custom runner Parameterized implements parameterized tests.
|
Parameterized.Parameter |
Annotation for fields of the test class which will be initialized by the
method annotated by Parameters .
|
Parameterized.Parameters |
Annotation for a method which provides parameters to be injected into the
test class constructor by Parameterized .
|
Parameterized.UseParametersRunnerFactory |
Add this annotation to your test class if you want to generate a special
runner.
|
ParameterizedAssertionError |
|
ParameterSignature |
|
ParametersRunnerFactory |
|
ParametersSuppliedBy |
Annotating a Theory method
parameter with @ParametersSuppliedBy causes it to be supplied with
values from the named
ParameterSupplier
when run as a theory by the Theories runner.
|
ParameterSupplier |
Abstract parent class for suppliers of input data points for theories.
|
ParentRunner<T> |
Provides most of the functionality specific to a Runner that implements a
"parent node" in the test tree, with children defined by objects of some data
type T .
|
PotentialAssignment |
|
PotentialAssignment.CouldNotGenerateValueException |
|
PrintableResult |
A test result that prints nicely in error messages.
|
Protectable |
A Protectable can be run and can throw a Throwable.
|
PublicClassValidator |
|
RealSystem |
|
ReflectiveCallable |
When invoked, throws the exception from the reflected method, rather than
wrapping it in an InvocationTargetException.
|
RepeatedTest |
A Decorator that runs a test repeatedly.
|
Request |
A Request is an abstract description of tests to be run.
|
Result |
A Result collects and summarizes information from running multiple tests.
|
Result.SerializedForm |
Represents the serialized output of Result .
|
ResultMatchers |
Matchers on a PrintableResult, to enable JUnit self-tests.
|
ResultPrinter |
|
Rule |
Annotates fields that reference rules or methods that return a rule.
|
RuleChain |
The RuleChain rule allows ordering of TestRules.
|
RuleMemberValidator |
A RuleMemberValidator validates the rule fields/methods of a
TestClass .
|
RuleMemberValidator.Builder |
|
RuleMemberValidator.DeclaringClassMustBePublic |
Requires the member's declaring class to be public
|
RuleMemberValidator.FieldMustBeARule |
|
RuleMemberValidator.FieldMustBeATestRule |
Requires the member is a field implementing TestRule
|
RuleMemberValidator.MemberMustBeNonStaticOrAlsoClassRule |
Requires the validated member to be non-static
|
RuleMemberValidator.MemberMustBePublic |
Requires the member to be public
|
RuleMemberValidator.MemberMustBeStatic |
Requires the member to be static
|
RuleMemberValidator.MethodMustBeARule |
|
RuleMemberValidator.MethodMustBeATestRule |
Require the member to return an implementation of TestRule
|
RuleMemberValidator.RuleValidator |
Encapsulates a single piece of validation logic, used to determine if Rule and
ClassRule annotations have been used correctly
|
RunAfters |
|
RunBefores |
|
RunListener |
Register an instance of this class with RunNotifier to be notified
of events that occur during a test run.
|
RunListener.ThreadSafe |
Indicates a RunListener that can have its methods called
concurrently.
|
Runner |
A Runner runs tests and notifies a RunNotifier
of significant events as it does so.
|
RunnerBuilder |
A RunnerBuilder is a strategy for constructing runners for classes.
|
RunnerScheduler |
Represents a strategy for scheduling when individual test methods
should be run (in serial or parallel)
WARNING: still experimental, may go away.
|
RunNotifier |
If you write custom runners, you may need to notify JUnit of your progress running tests.
|
RunRules |
Runs a collection of rules on a statement.
|
RunWith |
When a class is annotated with @RunWith or extends a class annotated
with @RunWith , JUnit will invoke the class it references to run the
tests in that class instead of the runner built into JUnit.
|
Sortable |
Interface for runners that allow sorting of tests.
|
Sorter |
A Sorter orders tests.
|
SortingRequest |
|
SpecificDataPointsSupplier |
|
StacktracePrintingMatcher<T extends java.lang.Throwable> |
A matcher that delegates to throwableMatcher and in addition appends the
stacktrace of the actual Throwable in case of a mismatch.
|
Statement |
Represents one or more actions to be taken at runtime in the course
of running a JUnit test suite.
|
StoppedByUserException |
Thrown when a user has requested that the test run stop.
|
Stopwatch |
The Stopwatch Rule notifies one of its own protected methods of the time spent by a test.
|
Stopwatch.Clock |
|
Suite |
Using Suite as a runner allows you to manually
build a suite containing tests from many classes.
|
Suite.SuiteClasses |
The SuiteClasses annotation specifies the classes to be run when a class
annotated with @RunWith(Suite.class) is run.
|
SuiteMethod |
Runner for use with JUnit 3.8.x-style AllTests classes
(those that only implement a static suite()
method).
|
SuiteMethodBuilder |
|
SynchronizedRunListener |
Thread-safe decorator for RunListener implementations that synchronizes
calls to the delegate.
|
TemporaryFolder |
The TemporaryFolder Rule allows creation of files and folders that should
be deleted when the test method finishes (whether it passes or
fails).
|
Test |
A Test can be run and collect its results.
|
Test |
The Test annotation tells JUnit that the public void method
to which it is attached can be run as a test case.
|
Test.None |
Default empty exception
|
TestCase |
A test case defines the fixture to run multiple tests.
|
TestClass |
Deprecated.
|
TestClass |
Wraps a class to be run, providing method validation and annotation searching
|
TestClass.FieldComparator |
Compares two fields by its name.
|
TestClass.MethodComparator |
Compares two methods by its name.
|
TestClassValidator |
Validates a single facet of a test class.
|
TestDecorator |
A Decorator for Tests.
|
TestedOn |
Annotating a Theory method int
parameter with @TestedOn causes it to be supplied with values from the
ints array given when run as a theory by the
Theories runner.
|
TestedOnSupplier |
|
TestFailure |
A TestFailure collects a failed test together with
the caught exception.
|
TestListener |
A Listener for test progress
|
TestMethod |
Deprecated.
|
TestName |
The TestName Rule makes the current test name available inside test methods:
|
TestResult |
A TestResult collects the results of executing
a test case.
|
TestRule |
A TestRule is an alteration in how a test method, or set of test methods,
is run and reported.
|
TestRunListener |
A listener interface for observing the
execution of a test run.
|
TestRunner |
A command line based tool to run tests.
|
TestSetup |
A Decorator to set up and tear down additional fixture state.
|
TestSuite |
A TestSuite is a Composite of Tests.
|
TestTimedOutException |
Exception thrown when a test fails on timeout.
|
TestWatcher |
TestWatcher is a base class for Rules that take note of the testing
action, without modifying it.
|
TestWatchman |
Deprecated.
|
TestWithParameters |
A TestWithParameters keeps the data together that are needed for
creating a runner for a single data set of a parameterized test.
|
TextListener |
|
Theories |
The Theories runner allows to test a certain functionality against a subset of an infinite set of data points.
|
Theories.TheoryAnchor |
|
Theory |
Marks test methods that should be read as theories by the Theories runner.
|
ThrowableCauseMatcher<T extends java.lang.Throwable> |
A matcher that applies a delegate matcher to the cause of the current Throwable, returning the result of that
match.
|
ThrowableMessageMatcher<T extends java.lang.Throwable> |
|
Throwables |
Miscellaneous functions dealing with Throwable .
|
Timeout |
The Timeout Rule applies the same timeout to all test methods in a class:
|
Timeout.Builder |
|
TypeSafeMatcher<T> |
Deprecated.
|
ValidateWith |
|
ValidationError |
|
Verifier |
Verifier is a base class for Rules like ErrorCollector, which can turn
otherwise passing test methods into failing tests if a verification check is
failed
|
Version |
This class defines the current version of JUnit
|