A B C D E F G H I J L M N O P R S T V W
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- aClass(Class<?>) - Static method in class org.junit.runner.Request
-
Create a
Request
that, when processed, will run all the tests in a class. - addChild(Description) - Method in class org.junit.runner.Description
-
Add
Description
as a child of the receiver. - addError(Throwable) - Method in class org.junit.rules.ErrorCollector
-
Adds a Throwable to the table.
- addFirstListener(RunListener) - Method in class org.junit.runner.notification.RunNotifier
-
Internal use only.
- addListener(RunListener) - Method in class org.junit.runner.JUnitCore
-
Add a listener to be notified as the tests run.
- addListener(RunListener) - Method in class org.junit.runner.notification.RunNotifier
-
Internal use only
- after() - Method in class org.junit.rules.ExternalResource
-
Override to tear down your specific external resource.
- after() - Method in class org.junit.rules.TemporaryFolder
- After - Annotation Type in org.junit
-
If you allocate external resources in a
Before
method you need to release them after the test runs. - AfterClass - Annotation Type in org.junit
-
If you allocate expensive external resources in a
BeforeClass
method you need to release them after all the tests in the class have run. - ALL - Static variable in class org.junit.runner.manipulation.Filter
-
A null
Filter
that passes all tests through. - AllTests - Class in org.junit.runners
-
Runner for use with JUnit 3.8.x-style AllTests classes (those that only implement a static
suite()
method). - AllTests(Class<?>) - Constructor for class org.junit.runners.AllTests
-
Only called reflectively.
- apply(Object) - Method in class org.junit.runner.manipulation.Filter
-
Invoke with a
Runner
to cause all tests it intends to run to first be checked with the filter. - apply(Object) - Method in class org.junit.runner.manipulation.Sorter
-
Sorts the test in
runner
usingcomparator
- apply(Statement, Description) - Method in class org.junit.rules.ExpectedException
- apply(Statement, Description) - Method in class org.junit.rules.ExternalResource
- apply(Statement, Description) - Method in class org.junit.rules.RuleChain
-
Modifies the method-running
Statement
to implement this test-running rule. - apply(Statement, Description) - Method in interface org.junit.rules.TestRule
-
Modifies the method-running
Statement
to implement this test-running rule. - apply(Statement, Description) - Method in class org.junit.rules.TestWatcher
- apply(Statement, Description) - Method in class org.junit.rules.Timeout
- apply(Statement, Description) - Method in class org.junit.rules.Verifier
- apply(Statement, FrameworkMethod, Object) - Method in interface org.junit.rules.MethodRule
-
Modifies the method-running
Statement
to implement an additional test-running rule. - apply(Statement, FrameworkMethod, Object) - Method in class org.junit.rules.TestWatchman
-
Deprecated.
- around(TestRule) - Method in class org.junit.rules.RuleChain
-
Create a new
RuleChain
, which encloses thenextRule
with the rules of the currentRuleChain
. - Assert - Class in org.junit
-
A set of assertion methods useful for writing tests.
- Assert() - Constructor for class org.junit.Assert
-
Protect constructor since it is a static only class
- assertArrayEquals(byte[], byte[]) - Static method in class org.junit.Assert
-
Asserts that two byte arrays are equal.
- assertArrayEquals(char[], char[]) - Static method in class org.junit.Assert
-
Asserts that two char arrays are equal.
- assertArrayEquals(double[], double[], double) - Static method in class org.junit.Assert
-
Asserts that two double arrays are equal.
- assertArrayEquals(float[], float[], float) - Static method in class org.junit.Assert
-
Asserts that two float arrays are equal.
- assertArrayEquals(int[], int[]) - Static method in class org.junit.Assert
-
Asserts that two int arrays are equal.
- assertArrayEquals(long[], long[]) - Static method in class org.junit.Assert
-
Asserts that two long arrays are equal.
- assertArrayEquals(short[], short[]) - Static method in class org.junit.Assert
-
Asserts that two short arrays are equal.
- assertArrayEquals(Object[], Object[]) - Static method in class org.junit.Assert
-
Asserts that two object arrays are equal.
- assertArrayEquals(String, byte[], byte[]) - Static method in class org.junit.Assert
-
Asserts that two byte arrays are equal.
- assertArrayEquals(String, char[], char[]) - Static method in class org.junit.Assert
-
Asserts that two char arrays are equal.
- assertArrayEquals(String, double[], double[], double) - Static method in class org.junit.Assert
-
Asserts that two double arrays are equal.
- assertArrayEquals(String, float[], float[], float) - Static method in class org.junit.Assert
-
Asserts that two float arrays are equal.
- assertArrayEquals(String, int[], int[]) - Static method in class org.junit.Assert
-
Asserts that two int arrays are equal.
- assertArrayEquals(String, long[], long[]) - Static method in class org.junit.Assert
-
Asserts that two long arrays are equal.
- assertArrayEquals(String, short[], short[]) - Static method in class org.junit.Assert
-
Asserts that two short arrays are equal.
- assertArrayEquals(String, Object[], Object[]) - Static method in class org.junit.Assert
-
Asserts that two object arrays are equal.
- assertEmpty(List<Throwable>) - Static method in exception org.junit.runners.model.MultipleFailureException
-
Asserts that a list of throwables is empty.
- assertEquals(double, double) - Static method in class org.junit.Assert
-
Deprecated.Use
assertEquals(double expected, double actual, double delta)
instead - assertEquals(double, double, double) - Static method in class org.junit.Assert
-
Asserts that two doubles are equal to within a positive delta.
- assertEquals(float, float, float) - Static method in class org.junit.Assert
-
Asserts that two floats are equal to within a positive delta.
- assertEquals(long, long) - Static method in class org.junit.Assert
-
Asserts that two longs are equal.
- assertEquals(Object[], Object[]) - Static method in class org.junit.Assert
-
Deprecated.use assertArrayEquals
- assertEquals(Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects are equal.
- assertEquals(String, double, double) - Static method in class org.junit.Assert
-
Deprecated.Use
assertEquals(String message, double expected, double actual, double delta)
instead - assertEquals(String, double, double, double) - Static method in class org.junit.Assert
-
Asserts that two doubles are equal to within a positive delta.
- assertEquals(String, float, float, float) - Static method in class org.junit.Assert
-
Asserts that two floats are equal to within a positive delta.
- assertEquals(String, long, long) - Static method in class org.junit.Assert
-
Asserts that two longs are equal.
- assertEquals(String, Object[], Object[]) - Static method in class org.junit.Assert
-
Deprecated.use assertArrayEquals
- assertEquals(String, Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects are equal.
- assertFalse(boolean) - Static method in class org.junit.Assert
-
Asserts that a condition is false.
- assertFalse(String, boolean) - Static method in class org.junit.Assert
-
Asserts that a condition is false.
- assertNotEquals(double, double, double) - Static method in class org.junit.Assert
-
Asserts that two doubles or floats are not equal to within a positive delta.
- assertNotEquals(long, long) - Static method in class org.junit.Assert
-
Asserts that two longs are not equals.
- assertNotEquals(Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects are not equals.
- assertNotEquals(String, double, double, double) - Static method in class org.junit.Assert
-
Asserts that two doubles or floats are not equal to within a positive delta.
- assertNotEquals(String, long, long) - Static method in class org.junit.Assert
-
Asserts that two longs are not equals.
- assertNotEquals(String, Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects are not equals.
- assertNotNull(Object) - Static method in class org.junit.Assert
-
Asserts that an object isn't null.
- assertNotNull(String, Object) - Static method in class org.junit.Assert
-
Asserts that an object isn't null.
- assertNotSame(Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects do not refer to the same object.
- assertNotSame(String, Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects do not refer to the same object.
- assertNull(Object) - Static method in class org.junit.Assert
-
Asserts that an object is null.
- assertNull(String, Object) - Static method in class org.junit.Assert
-
Asserts that an object is null.
- assertSame(Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects refer to the same object.
- assertSame(String, Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects refer to the same object.
- assertThat(String, T, Matcher<? super T>) - Static method in class org.junit.Assert
-
Asserts that
actual
satisfies the condition specified bymatcher
. - assertThat(T, Matcher<? super T>) - Static method in class org.junit.Assert
-
Asserts that
actual
satisfies the condition specified bymatcher
. - assertTrue(boolean) - Static method in class org.junit.Assert
-
Asserts that a condition is true.
- assertTrue(String, boolean) - Static method in class org.junit.Assert
-
Asserts that a condition is true.
- Assume - Class in org.junit
-
A set of methods useful for stating assumptions about the conditions in which a test is meaningful.
- Assume() - Constructor for class org.junit.Assume
- assumeFalse(boolean) - Static method in class org.junit.Assume
-
The inverse of
Assume.assumeTrue(boolean)
. - assumeFalse(String, boolean) - Static method in class org.junit.Assume
-
The inverse of
Assume.assumeTrue(String, boolean)
. - assumeNoException(String, Throwable) - Static method in class org.junit.Assume
-
Attempts to halt the test and ignore it if Throwable
t
is notnull
. - assumeNoException(Throwable) - Static method in class org.junit.Assume
-
Use to assume that an operation completes normally.
- assumeNotNull(Object...) - Static method in class org.junit.Assume
-
If called with one or more null elements in
objects
, the test will halt and be ignored. - assumeThat(String, T, Matcher<T>) - Static method in class org.junit.Assume
-
Call to assume that
actual
satisfies the condition specified bymatcher
. - assumeThat(T, Matcher<T>) - Static method in class org.junit.Assume
-
Call to assume that
actual
satisfies the condition specified bymatcher
. - assumeTrue(boolean) - Static method in class org.junit.Assume
-
If called with an expression evaluating to
false
, the test will halt and be ignored. - assumeTrue(String, boolean) - Static method in class org.junit.Assume
-
If called with an expression evaluating to
false
, the test will halt and be ignored.
B
- before() - Method in class org.junit.rules.ExternalResource
-
Override to set up your specific external resource.
- before() - Method in class org.junit.rules.TemporaryFolder
- Before - Annotation Type in org.junit
-
When writing tests, it is common to find that several tests need similar objects created before they can run.
- BeforeClass - Annotation Type in org.junit
-
Sometimes several tests need to share computationally expensive setup (like logging into a database).
- BlockJUnit4ClassRunner - Class in org.junit.runners
-
Implements the JUnit 4 standard test case class model, as defined by the annotations in the org.junit package.
- BlockJUnit4ClassRunner(Class<?>) - Constructor for class org.junit.runners.BlockJUnit4ClassRunner
-
Creates a BlockJUnit4ClassRunner to run
klass
- both(Matcher<? super T>) - Static method in class org.junit.matchers.JUnitMatchers
-
Deprecated.Please use
CoreMatchers.both(Matcher)
instead.
C
- canAcceptArrayType(Class<?>) - Method in class org.junit.experimental.theories.ParameterSignature
- canAcceptType(Class<?>) - Method in class org.junit.experimental.theories.ParameterSignature
- Categories - Class in org.junit.experimental.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(Class<?>, RunnerBuilder) - Constructor for class org.junit.experimental.categories.Categories
- Categories.CategoryFilter - Class in org.junit.experimental.categories
- Categories.ExcludeCategory - Annotation Type in org.junit.experimental.categories
- Categories.IncludeCategory - Annotation Type in org.junit.experimental.categories
- Category - Annotation Type in org.junit.experimental.categories
-
Marks a test class or test method as belonging to one or more categories of tests.
- CategoryFilter(Class<?>, Class<?>) - Constructor for class org.junit.experimental.categories.Categories.CategoryFilter
- checkSucceeds(Callable<Object>) - Method in class org.junit.rules.ErrorCollector
-
Adds to the table the exception, if any, thrown from
callable
. - checkThat(String, T, Matcher<T>) - Method in class org.junit.rules.ErrorCollector
-
Adds a failure with the given
reason
to the table ifmatcher
does not matchvalue
. - checkThat(T, Matcher<T>) - Method in class org.junit.rules.ErrorCollector
-
Adds a failure to the table if
matcher
does not matchvalue
. - childlessCopy() - Method in class org.junit.runner.Description
- childrenInvoker(RunNotifier) - Method in class org.junit.runners.ParentRunner
-
Returns a
Statement
: CallParentRunner.runChild(Object, RunNotifier)
on each object returned byParentRunner.getChildren()
(subject to any imposed filter and sort) - classBlock(RunNotifier) - Method in class org.junit.runners.ParentRunner
-
Constructs a
Statement
to run all of the tests in the test class. - classes() - Static method in class org.junit.experimental.ParallelComputer
- classes(Class<?>...) - Static method in class org.junit.runner.Request
-
Create a
Request
that, when processed, will run all the tests in a set of classes with the defaultComputer
. - classes(Computer, Class<?>...) - Static method in class org.junit.runner.Request
-
Create a
Request
that, when processed, will run all the tests in a set of classes. - ClassRule - Annotation Type in org.junit
-
Annotates static fields that reference rules or methods that return them.
- classRules() - Method in class org.junit.runners.ParentRunner
- classWithoutSuiteMethod(Class<?>) - Static method in class org.junit.runner.Request
-
Create a
Request
that, when processed, will run all the tests in a class. - collectInitializationErrors(List<Throwable>) - Method in class org.junit.experimental.theories.Theories
- collectInitializationErrors(List<Throwable>) - Method in class org.junit.runners.BlockJUnit4ClassRunner
- collectInitializationErrors(List<Throwable>) - Method in class org.junit.runners.ParentRunner
-
Adds to
errors
a throwable for each problem noted with the test class (available fromParentRunner.getTestClass()
). - compare(Description, Description) - Method in class org.junit.runner.manipulation.Sorter
- ComparisonFailure - Error in org.junit
-
Thrown when an
assertEquals(String, String)
fails. - ComparisonFailure(String, String, String) - Constructor for error org.junit.ComparisonFailure
-
Constructs a comparison failure.
- Computer - Class in org.junit.runner
-
Represents a strategy for computing runners and suites.
- Computer() - Constructor for class org.junit.runner.Computer
- computeTestMethods() - Method in class org.junit.experimental.theories.Theories
- computeTestMethods() - Method in class org.junit.runners.BlockJUnit4ClassRunner
-
Returns the methods that run tests.
- containsString(String) - Static method in class org.junit.matchers.JUnitMatchers
-
Deprecated.Please use
CoreMatchers.containsString(String)
instead. - CouldNotGenerateValueException() - Constructor for exception org.junit.experimental.theories.PotentialAssignment.CouldNotGenerateValueException
- CouldNotReadCoreException - Exception in org.junit.experimental.max
-
Thrown when Max cannot read the MaxCore serialization
- CouldNotReadCoreException(Throwable) - Constructor for exception org.junit.experimental.max.CouldNotReadCoreException
-
Constructs
- create() - Method in class org.junit.rules.TemporaryFolder
-
for testing purposes only.
- createListener() - Method in class org.junit.runner.Result
-
Internal use only.
- createSuiteDescription(Class<?>) - Static method in class org.junit.runner.Description
-
Create a
Description
named aftertestClass
- createSuiteDescription(String, Serializable, Annotation...) - Static method in class org.junit.runner.Description
-
Create a
Description
namedname
. - createSuiteDescription(String, Annotation...) - Static method in class org.junit.runner.Description
-
Create a
Description
namedname
. - createTest() - Method in class org.junit.runners.BlockJUnit4ClassRunner
-
Returns a new fixture for running a test.
- createTestDescription(Class<?>, String) - Static method in class org.junit.runner.Description
-
Create a
Description
of a single test namedname
in the classclazz
. - createTestDescription(Class<?>, String, Annotation...) - Static method in class org.junit.runner.Description
-
Create a
Description
of a single test namedname
in the classclazz
. - createTestDescription(String, String, Serializable) - Static method in class org.junit.runner.Description
-
Create a
Description
of a single test namedname
in the classclazz
. - createTestDescription(String, String, Annotation...) - Static method in class org.junit.runner.Description
-
Create a
Description
of a single test namedname
in the 'class' namedclassName
.
D
- DataPoint - Annotation Type in org.junit.experimental.theories
- DataPoints - Annotation Type in org.junit.experimental.theories
- DEFAULT - org.junit.runners.MethodSorters
-
Sorts the test methods in a deterministic, but not predictable, order
- delete() - Method in class org.junit.rules.TemporaryFolder
-
Delete all files and folders under the temporary folder.
- Describable - Interface in org.junit.runner
-
Represents an object that can describe itself
- describe() - Method in class org.junit.experimental.categories.Categories.CategoryFilter
- describe() - Method in class org.junit.runner.manipulation.Filter
-
Returns a textual description of this Filter
- describeChild(Runner) - Method in class org.junit.runners.Suite
- describeChild(FrameworkMethod) - Method in class org.junit.runners.BlockJUnit4ClassRunner
- describeChild(T) - Method in class org.junit.runners.ParentRunner
-
Returns a
Description
forchild
, which can be assumed to be an element of the list returned byParentRunner.getChildren()
- Description - Class in org.junit.runner
-
A
Description
describes a test which is to be run or has been run.
E
- either(Matcher<? super T>) - Static method in class org.junit.matchers.JUnitMatchers
-
Deprecated.Please use
CoreMatchers.either(Matcher)
instead. - EMPTY - Static variable in class org.junit.runner.Description
-
Describes a Runner which runs no tests
- emptyRuleChain() - Static method in class org.junit.rules.RuleChain
-
Returns a
RuleChain
without aTestRule
. - emptySuite() - Static method in class org.junit.runners.Suite
-
Returns an empty suite.
- Enclosed - Class in org.junit.experimental.runners
-
If you put tests in inner classes, Ant, for example, won't find them.
- Enclosed(Class<?>, RunnerBuilder) - Constructor for class org.junit.experimental.runners.Enclosed
-
Only called reflectively.
- equals(Object) - Method in class org.junit.runner.Description
- equals(Object) - Method in class org.junit.runners.model.FrameworkMethod
- ErrorCollector - Class in org.junit.rules
-
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):
- ErrorCollector() - Constructor for class org.junit.rules.ErrorCollector
- errorReport(Class<?>, Throwable) - Static method in class org.junit.runner.Request
-
Deprecated.
- evaluate() - Method in class org.junit.experimental.theories.Theories.TheoryAnchor
- evaluate() - Method in class org.junit.rules.RunRules
- evaluate() - Method in class org.junit.runners.model.Statement
-
Run the action, throwing a
Throwable
if anything goes wrong. - everyItem(Matcher<T>) - Static method in class org.junit.matchers.JUnitMatchers
-
Deprecated.Please use
CoreMatchers.everyItem(Matcher)
instead. - expect(Class<? extends Throwable>) - Method in class org.junit.rules.ExpectedException
-
Adds to the list of requirements for any thrown exception that it should be an instance of
type
- expect(Matcher<?>) - Method in class org.junit.rules.ExpectedException
-
Adds
matcher
to the list of requirements for any thrown exception. - expectCause(Matcher<? extends Throwable>) - Method in class org.junit.rules.ExpectedException
-
Adds
matcher
to the list of requirements for the cause of any thrown exception. - expected() - Method in annotation type org.junit.Test
-
Optionally specify
expected
, a Throwable, to cause a test method to succeed iff an exception of the specified class is thrown by the method. - ExpectedException - Class in org.junit.rules
-
The ExpectedException rule allows in-test specification of expected exception types and messages:
- expectMessage(String) - Method in class org.junit.rules.ExpectedException
-
Adds to the list of requirements for any thrown exception that it should contain string
substring
- expectMessage(Matcher<String>) - Method in class org.junit.rules.ExpectedException
-
Adds
matcher
to the list of requirements for the message returned from any thrown exception. - ExternalResource - Class in org.junit.rules
-
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:
- ExternalResource() - Constructor for class org.junit.rules.ExternalResource
F
- fail() - Static method in class org.junit.Assert
-
Fails a test with no message.
- fail(String) - Static method in class org.junit.Assert
-
Fails a test with the given message.
- failed(Throwable, Description) - Method in class org.junit.rules.TestWatcher
-
Invoked when a test fails
- failed(Throwable, FrameworkMethod) - Method in class org.junit.rules.TestWatchman
-
Deprecated.Invoked when a test method fails
- Failure - Class in org.junit.runner.notification
-
A
Failure
holds a description of the failed test and the exception that was thrown while running it. - Failure(Description, Throwable) - Constructor for class org.junit.runner.notification.Failure
-
Constructs a
Failure
with the given description and exception. - failureCount() - Method in class org.junit.experimental.results.PrintableResult
-
Returns the number of failures in this result.
- failureCountIs(int) - Static method in class org.junit.experimental.results.ResultMatchers
-
Matches if there are
count
failures - filter(Filter) - Method in interface org.junit.runner.manipulation.Filterable
-
Remove tests that don't pass the parameter
filter
. - filter(Filter) - Method in class org.junit.runners.ParentRunner
- Filter - Class in org.junit.runner.manipulation
-
The canonical case of filtering is when you want to run a single test method in a class.
- Filter() - Constructor for class org.junit.runner.manipulation.Filter
- Filterable - Interface in org.junit.runner.manipulation
-
Runners that allow filtering should implement this interface.
- filterWith(Description) - Method in class org.junit.runner.Request
-
Returns a Request that only runs contains tests whose
Description
equalsdesiredDescription
- filterWith(Filter) - Method in class org.junit.runner.Request
-
Returns a Request that only contains those tests that should run when
filter
is applied - findDeepAnnotation(Class<T>) - Method in class org.junit.experimental.theories.ParameterSignature
- finished() - Method in interface org.junit.runners.model.RunnerScheduler
-
Override to implement any behavior that must occur after all children have been scheduled (for example, waiting for them all to finish)
- finished(Description) - Method in class org.junit.rules.TestWatcher
-
Invoked when a test method finishes (whether passing or failing)
- finished(FrameworkMethod) - Method in class org.junit.rules.TestWatchman
-
Deprecated.Invoked when a test method finishes (whether passing or failing)
- fireTestAssumptionFailed(Failure) - Method in class org.junit.runner.notification.RunNotifier
-
Invoke to tell listeners that an atomic test flagged that it assumed something false.
- fireTestFailure(Failure) - Method in class org.junit.runner.notification.RunNotifier
-
Invoke to tell listeners that an atomic test failed.
- fireTestFinished(Description) - Method in class org.junit.runner.notification.RunNotifier
-
Invoke to tell listeners that an atomic test finished.
- fireTestIgnored(Description) - Method in class org.junit.runner.notification.RunNotifier
-
Invoke to tell listeners that an atomic test was ignored.
- fireTestRunFinished(Result) - Method in class org.junit.runner.notification.RunNotifier
-
Do not invoke.
- fireTestRunStarted(Description) - Method in class org.junit.runner.notification.RunNotifier
-
Do not invoke.
- fireTestStarted(Description) - Method in class org.junit.runner.notification.RunNotifier
-
Invoke to tell listeners that an atomic test is about to start.
- FixMethodOrder - Annotation Type in org.junit
-
This class allows the user to choose the order of execution of the methods within a test class.
- forFolder(File) - Static method in class org.junit.experimental.max.MaxHistory
- forFolder(String) - Static method in class org.junit.experimental.max.MaxCore
-
Deprecated.use storedLocally()
- forValue(String, Object) - Static method in class org.junit.experimental.theories.PotentialAssignment
- FrameworkField - Class in org.junit.runners.model
-
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>> - Class in org.junit.runners.model
-
Parent class for
FrameworkField
andFrameworkMethod
- FrameworkMember() - Constructor for class org.junit.runners.model.FrameworkMember
- FrameworkMethod - Class in org.junit.runners.model
-
Represents a method on a test class to be invoked at the appropriate point in test execution.
- FrameworkMethod(Method) - Constructor for class org.junit.runners.model.FrameworkMethod
-
Returns a new
FrameworkMethod
formethod
G
- get(Object) - Method in class org.junit.runners.model.FrameworkField
-
Attempts to retrieve the value of this field on
target
- getActual() - Method in error org.junit.ComparisonFailure
-
Returns the actual string value
- getAnnotatedFields(Class<? extends Annotation>) - Method in class org.junit.runners.model.TestClass
-
Returns, efficiently, all the non-overridden fields in this class and its superclasses that are annotated with
annotationClass
. - getAnnotatedFieldValues(Object, Class<? extends Annotation>, Class<T>) - Method in class org.junit.runners.model.TestClass
- getAnnotatedMethods(Class<? extends Annotation>) - Method in class org.junit.runners.model.TestClass
-
Returns, efficiently, all the non-overridden methods in this class and its superclasses that are annotated with
annotationClass
. - getAnnotatedMethodValues(Object, Class<? extends Annotation>, Class<T>) - Method in class org.junit.runners.model.TestClass
- getAnnotation(Class<T>) - Method in class org.junit.experimental.theories.ParameterSignature
- getAnnotation(Class<T>) - Method in class org.junit.runner.Description
- getAnnotation(Class<T>) - Method in class org.junit.runners.model.FrameworkMethod
-
Returns the annotation of type
annotationType
on this method, if one exists. - getAnnotations() - Method in class org.junit.experimental.theories.ParameterSignature
- getAnnotations() - Method in class org.junit.runner.Description
- getAnnotations() - Method in class org.junit.runners.model.FrameworkField
- getAnnotations() - Method in class org.junit.runners.model.FrameworkMethod
-
Returns the annotations on this method
- getAnnotations() - Method in class org.junit.runners.model.TestClass
-
Returns the annotations on this class
- getCauses() - Method in exception org.junit.runners.model.InitializationError
-
Returns one or more Throwables that led to this initialization error.
- getChildren() - Method in class org.junit.runner.Description
- getChildren() - Method in class org.junit.runners.BlockJUnit4ClassRunner
- getChildren() - Method in class org.junit.runners.Parameterized
- getChildren() - Method in class org.junit.runners.ParentRunner
-
Returns a list of objects that define the children of this Runner.
- getChildren() - Method in class org.junit.runners.Suite
- getClassName() - Method in class org.junit.runner.Description
- getComparator() - Method in enum org.junit.runners.MethodSorters
- getDescription() - Method in class org.junit.experimental.theories.PotentialAssignment
- getDescription() - Method in interface org.junit.runner.Describable
- getDescription() - Method in class org.junit.runner.notification.Failure
- getDescription() - Method in class org.junit.runner.Runner
- getDescription() - Method in class org.junit.runners.ParentRunner
- getDisplayName() - Method in class org.junit.runner.Description
- getException() - Method in class org.junit.runner.notification.Failure
- getExpected() - Method in error org.junit.ComparisonFailure
-
Returns the expected string value
- getFailureCount() - Method in class org.junit.runner.Result
- getFailures() - Method in class org.junit.runner.Result
- getFailures() - Method in exception org.junit.runners.model.MultipleFailureException
- getField() - Method in class org.junit.runners.model.FrameworkField
- getIgnoreCount() - Method in class org.junit.runner.Result
- getJavaClass() - Method in class org.junit.runners.model.TestClass
-
Returns the underlying Java class.
- getMessage() - Method in error org.junit.ComparisonFailure
-
Returns "..." in place of common prefix and "..." in place of common suffix between expected and actual.
- getMessage() - Method in class org.junit.runner.notification.Failure
-
Convenience method
- getMessage() - Method in exception org.junit.runners.model.MultipleFailureException
- getMethod() - Method in class org.junit.runners.model.FrameworkMethod
-
Returns the underlying Java method
- getMethodName() - Method in class org.junit.rules.TestName
- getMethodName() - Method in class org.junit.runner.Description
- getName() - Method in class org.junit.runners.model.FrameworkField
- getName() - Method in class org.junit.runners.model.FrameworkMember
- getName() - Method in class org.junit.runners.model.FrameworkMethod
-
Returns the method's name
- getName() - Method in class org.junit.runners.model.TestClass
-
Returns the class's name.
- getName() - Method in class org.junit.runners.ParentRunner
-
Returns a name used to describe this Runner
- getOnlyConstructor() - Method in class org.junit.runners.model.TestClass
-
Returns the only public constructor in the class, or throws an
AssertionError
if there are more or less than one. - getReturnType() - Method in class org.junit.runners.model.FrameworkMethod
-
Returns the return type of the method
- getRoot() - Method in class org.junit.rules.TemporaryFolder
- getRunCount() - Method in class org.junit.runner.Result
- getRunner() - Method in class org.junit.runner.Request
-
Returns a
Runner
for this Request - getRunner(RunnerBuilder, Class<?>) - Method in class org.junit.experimental.ParallelComputer
- getRunner(RunnerBuilder, Class<?>) - Method in class org.junit.runner.Computer
-
Create a single-class runner for
testClass
, usingbuilder
- getRunnerAnnotations() - Method in class org.junit.runners.ParentRunner
- getRunTime() - Method in class org.junit.runner.Result
- getSuite(RunnerBuilder, Class<?>[]) - Method in class org.junit.experimental.ParallelComputer
- getSuite(RunnerBuilder, Class<?>[]) - Method in class org.junit.runner.Computer
-
Create a suite for
classes
, building Runners withbuilder
. - getTestClass() - Method in class org.junit.runner.Description
- getTestClass() - Method in class org.junit.runners.ParentRunner
-
Returns a
TestClass
object wrapping the class to be executed. - getTestHeader() - Method in class org.junit.runner.notification.Failure
- getTestRules(Object) - Method in class org.junit.runners.BlockJUnit4ClassRunner
- getTrace() - Method in class org.junit.runner.notification.Failure
-
Convenience method
- getType() - Method in class org.junit.experimental.theories.ParameterSignature
- getType() - Method in class org.junit.runners.model.FrameworkField
- getType() - Method in class org.junit.runners.model.FrameworkMember
- getType() - Method in class org.junit.runners.model.FrameworkMethod
-
Returns the return type of the method
- getValue() - Method in class org.junit.experimental.theories.PotentialAssignment
- getValueSources(ParameterSignature) - Method in class org.junit.experimental.theories.ParameterSupplier
- getValueSources(ParameterSignature) - Method in class org.junit.experimental.theories.suppliers.TestedOnSupplier
- getVersion() - Method in class org.junit.runner.JUnitCore
H
- handleAssertionErrors() - Method in class org.junit.rules.ExpectedException
- handleAssumptionViolatedExceptions() - Method in class org.junit.rules.ExpectedException
- handleAssumptionViolation(AssumptionViolatedException) - Method in class org.junit.experimental.theories.Theories.TheoryAnchor
- handleDataPointSuccess() - Method in class org.junit.experimental.theories.Theories.TheoryAnchor
- hasAnnotation(Class<? extends Annotation>) - Method in class org.junit.experimental.theories.ParameterSignature
- hasFailureContaining(String) - Static method in class org.junit.experimental.results.ResultMatchers
-
Matches if the result has one or more failures, and at least one of them contains
string
- hashCode() - Method in class org.junit.runner.Description
- hashCode() - Method in class org.junit.runners.model.FrameworkMethod
- hasItem(Matcher<? super T>) - Static method in class org.junit.matchers.JUnitMatchers
-
Deprecated.Please use
CoreMatchers.hasItem(Matcher)
instead. - hasItem(T) - Static method in class org.junit.matchers.JUnitMatchers
-
Deprecated.Please use
CoreMatchers.hasItem(Object)
instead. - hasItems(Matcher<? super T>...) - Static method in class org.junit.matchers.JUnitMatchers
-
Deprecated.Please use
CoreMatchers.hasItems(Matcher...)
instead. - hasItems(T...) - Static method in class org.junit.matchers.JUnitMatchers
-
Deprecated.Please use
CoreMatchers.hasItems(Object...)
instead. - hasSingleFailureContaining(String) - Static method in class org.junit.experimental.results.ResultMatchers
-
Matches if the result has exactly one failure, and it contains
string
I
- Ignore - Annotation Type in org.junit
-
Sometimes you want to temporarily disable a test or a group of tests.
- include(Class<?>) - Static method in class org.junit.experimental.categories.Categories.CategoryFilter
- InitializationError - Exception in org.junit.runners.model
-
Represents one or more problems encountered while initializing a Runner
- InitializationError(String) - Constructor for exception org.junit.runners.model.InitializationError
-
Construct a new
InitializationError
with one cause with messagestring
- InitializationError(Throwable) - Constructor for exception org.junit.runners.model.InitializationError
- InitializationError(List<Throwable>) - Constructor for exception org.junit.runners.model.InitializationError
-
Construct a new
InitializationError
with one or more errorserrors
as causes - intersect(Filter) - Method in class org.junit.runner.manipulation.Filter
-
Returns a new Filter that accepts the intersection of the tests accepted by this Filter and
second
- ints() - Method in annotation type org.junit.experimental.theories.suppliers.TestedOn
- invokeExplosively(Object, Object...) - Method in class org.junit.runners.model.FrameworkMethod
-
Returns the result of invoking this method on
target
with parametersparams
. - isANonStaticInnerClass() - Method in class org.junit.runners.model.TestClass
- isEmpty() - Method in class org.junit.runner.Description
- isException(Matcher<T>) - Static method in class org.junit.matchers.JUnitMatchers
- isPublic() - Method in class org.junit.runners.model.FrameworkField
- isPublic() - Method in class org.junit.runners.model.FrameworkMember
- isPublic() - Method in class org.junit.runners.model.FrameworkMethod
-
Returns true if this method is public, false if not
- isShadowedBy(FrameworkField) - Method in class org.junit.runners.model.FrameworkField
- isShadowedBy(FrameworkMethod) - Method in class org.junit.runners.model.FrameworkMethod
- isStatic() - Method in class org.junit.runners.model.FrameworkField
- isStatic() - Method in class org.junit.runners.model.FrameworkMember
- isStatic() - Method in class org.junit.runners.model.FrameworkMethod
-
Returns true if this method is static, false if not
- isSuccessful() - Static method in class org.junit.experimental.results.ResultMatchers
-
Matches if the tests are all successful
- isSuite() - Method in class org.junit.runner.Description
- isTest() - Method in class org.junit.runner.Description
- isThrowable(Matcher<T>) - Static method in class org.junit.matchers.JUnitMatchers
J
- JUnit4 - Class in org.junit.runners
-
Aliases the current default JUnit 4 class runner, for future-proofing.
- JUnit4(Class<?>) - Constructor for class org.junit.runners.JUnit4
-
Constructs a new instance of the default runner
- JUnitCore - Class in org.junit.runner
-
JUnitCore
is a facade for running tests. - JUnitCore() - Constructor for class org.junit.runner.JUnitCore
- JUnitMatchers - Class in org.junit.matchers
-
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.
- JUnitMatchers() - Constructor for class org.junit.matchers.JUnitMatchers
- JVM - org.junit.runners.MethodSorters
-
Leaves the test methods in the order returned by the JVM.
L
- listener() - Method in class org.junit.experimental.max.MaxHistory
M
- main(String...) - Static method in class org.junit.runner.JUnitCore
-
Run the tests contained in the classes named in the
args
. - matchMethodDescription(Description) - Static method in class org.junit.runner.manipulation.Filter
-
Returns a
Filter
that only runs the single method described bydesiredDescription
- MaxCore - Class in org.junit.experimental.max
-
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 - Class in org.junit.experimental.max
-
Stores a subset of the history of each test: Last failure timestamp Duration of last execution
- method(Class<?>, String) - Static method in class org.junit.runner.Request
-
Create a
Request
that, when processed, will run a single test. - methodBlock(FrameworkMethod) - Method in class org.junit.experimental.theories.Theories
- methodBlock(FrameworkMethod) - Method in class org.junit.runners.BlockJUnit4ClassRunner
-
Returns a Statement that, when executed, either returns normally if
method
passes, or throws an exception ifmethod
fails. - methodInvoker(FrameworkMethod, Object) - Method in class org.junit.runners.BlockJUnit4ClassRunner
- MethodRule - Interface in org.junit.rules
-
A MethodRule is an alteration in how a test method is run and reported.
- methods() - Static method in class org.junit.experimental.ParallelComputer
- MethodSorters - Enum in org.junit.runners
-
Sort the methods into a specified execution order.
- MultipleFailureException - Exception in org.junit.runners.model
-
Collects multiple
Throwable
s into one exception. - MultipleFailureException(List<Throwable>) - Constructor for exception org.junit.runners.model.MultipleFailureException
N
- name() - Method in annotation type org.junit.runners.Parameterized.Parameters
-
Optional pattern to derive the test's name from the parameters.
- NAME_ASCENDING - org.junit.runners.MethodSorters
-
Sorts the test methods by the method name, in lexicographic order, with
Method.toString()
used as a tiebreaker - newFile() - Method in class org.junit.rules.TemporaryFolder
-
Returns a new fresh file with a random name under the temporary folder.
- newFile(String) - Method in class org.junit.rules.TemporaryFolder
-
Returns a new fresh file with the given name under the temporary folder.
- newFolder() - Method in class org.junit.rules.TemporaryFolder
-
Returns a new fresh folder with a random name under the temporary folder.
- newFolder(String) - Method in class org.junit.rules.TemporaryFolder
-
Returns a new fresh folder with the given name under the temporary folder.
- newFolder(String...) - Method in class org.junit.rules.TemporaryFolder
-
Returns a new fresh folder with the given name(s) under the temporary folder.
- none() - Static method in class org.junit.rules.ExpectedException
- NoTestsRemainException - Exception in org.junit.runner.manipulation
-
Thrown when a filter removes all tests from a runner.
- NoTestsRemainException() - Constructor for exception org.junit.runner.manipulation.NoTestsRemainException
- NULL - Static variable in class org.junit.runner.manipulation.Sorter
-
NULL is a
Sorter
that leaves elements in an undefined order - nullsAccepted() - Method in annotation type org.junit.experimental.theories.Theory
O
- org.junit - package org.junit
-
Provides JUnit core classes and annotations.
- org.junit.experimental - package org.junit.experimental
- org.junit.experimental.categories - package org.junit.experimental.categories
- org.junit.experimental.max - package org.junit.experimental.max
- org.junit.experimental.results - package org.junit.experimental.results
- org.junit.experimental.runners - package org.junit.experimental.runners
- org.junit.experimental.theories - package org.junit.experimental.theories
- org.junit.experimental.theories.suppliers - package org.junit.experimental.theories.suppliers
- org.junit.matchers - package org.junit.matchers
-
Provides useful additional
Matcher
s for use with theAssert.assertThat(Object, org.hamcrest.Matcher)
statement - org.junit.rules - package org.junit.rules
- org.junit.runner - package org.junit.runner
-
Provides classes used to describe, collect, run and analyze multiple tests.
- org.junit.runner.manipulation - package org.junit.runner.manipulation
- org.junit.runner.notification - package org.junit.runner.notification
-
Provides information about a test run.
- org.junit.runners - package org.junit.runners
-
Provides standard
Runner
implementations. - org.junit.runners.model - package org.junit.runners.model
- outerRule(TestRule) - Static method in class org.junit.rules.RuleChain
-
Returns a
RuleChain
with a singleTestRule
.
P
- ParallelComputer - Class in org.junit.experimental
- ParallelComputer(boolean, boolean) - Constructor for class org.junit.experimental.ParallelComputer
- Parameterized - Class in org.junit.runners
-
The custom runner
Parameterized
implements parameterized tests. - Parameterized(Class<?>) - Constructor for class org.junit.runners.Parameterized
-
Only called reflectively.
- Parameterized.Parameter - Annotation Type in org.junit.runners
-
Annotation for fields of the test class which will be initialized by the method annotated by
Parameters
By using directly this annotation, the test class constructor isn't needed.
Index range must start at 0. - Parameterized.Parameters - Annotation Type in org.junit.runners
-
Annotation for a method which provides parameters to be injected into the test class constructor by
Parameterized
- ParameterSignature - Class in org.junit.experimental.theories
- ParametersSuppliedBy - Annotation Type in org.junit.experimental.theories
- ParameterSupplier - Class in org.junit.experimental.theories
- ParameterSupplier() - Constructor for class org.junit.experimental.theories.ParameterSupplier
- ParentRunner<T> - Class in org.junit.runners
-
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
. - ParentRunner(Class<?>) - Constructor for class org.junit.runners.ParentRunner
-
Constructs a new
ParentRunner
that will run@TestClass
- pleaseStop() - Method in class org.junit.runner.notification.RunNotifier
-
Ask that the tests run stop before starting the next test.
- possiblyExpectingExceptions(FrameworkMethod, Object, Statement) - Method in class org.junit.runners.BlockJUnit4ClassRunner
-
Deprecated.Will be private soon: use Rules instead
- PotentialAssignment - Class in org.junit.experimental.theories
- PotentialAssignment() - Constructor for class org.junit.experimental.theories.PotentialAssignment
- PotentialAssignment.CouldNotGenerateValueException - Exception in org.junit.experimental.theories
- PrintableResult - Class in org.junit.experimental.results
-
A test result that prints nicely in error messages.
- PrintableResult(List<Failure>) - Constructor for class org.junit.experimental.results.PrintableResult
-
A result that includes the given
failures
- producesType(Type) - Method in class org.junit.runners.model.FrameworkMethod
-
Deprecated.This is used only by the Theories runner, and does not use all the generic type info that it ought to. It will be replaced with a forthcoming ParameterSignature#canAcceptResultOf(FrameworkMethod) once Theories moves to junit-contrib.
R
- removeListener(RunListener) - Method in class org.junit.runner.JUnitCore
-
Remove a listener.
- removeListener(RunListener) - Method in class org.junit.runner.notification.RunNotifier
-
Internal use only
- reportParameterizedError(Throwable, Object...) - Method in class org.junit.experimental.theories.Theories.TheoryAnchor
- Request - Class in org.junit.runner
-
A
Request
is an abstract description of tests to be run. - Request() - Constructor for class org.junit.runner.Request
- Result - Class in org.junit.runner
-
A
Result
collects and summarizes information from running multiple tests. - Result() - Constructor for class org.junit.runner.Result
- ResultMatchers - Class in org.junit.experimental.results
-
Matchers on a PrintableResult, to enable JUnit self-tests.
- ResultMatchers() - Constructor for class org.junit.experimental.results.ResultMatchers
- Rule - Annotation Type in org.junit
-
Annotates fields that reference rules or methods that return a rule.
- RuleChain - Class in org.junit.rules
-
The RuleChain rule allows ordering of TestRules.
- rules(Object) - Method in class org.junit.runners.BlockJUnit4ClassRunner
- run(Class<?>) - Method in class org.junit.experimental.max.MaxCore
-
Run all the tests in
class
. - run(Class<?>...) - Method in class org.junit.runner.JUnitCore
-
Run all the tests in
classes
. - run(Test) - Method in class org.junit.runner.JUnitCore
-
Run all the tests contained in JUnit 3.8.x
test
. - run(Computer, Class<?>...) - Method in class org.junit.runner.JUnitCore
-
Run all the tests in
classes
. - run(RunNotifier) - Method in class org.junit.runner.Runner
-
Run the tests for this runner.
- run(RunNotifier) - Method in class org.junit.runners.ParentRunner
- run(Request) - Method in class org.junit.experimental.max.MaxCore
-
Run all the tests contained in
request
. - run(Request) - Method in class org.junit.runner.JUnitCore
-
Run all the tests contained in
request
. - run(Request, JUnitCore) - Method in class org.junit.experimental.max.MaxCore
-
Run all the tests contained in
request
. - run(Runner) - Method in class org.junit.runner.JUnitCore
-
Do not use.
- runChild(Runner, RunNotifier) - Method in class org.junit.runners.Suite
- runChild(FrameworkMethod, RunNotifier) - Method in class org.junit.runners.BlockJUnit4ClassRunner
- runChild(T, RunNotifier) - Method in class org.junit.runners.ParentRunner
-
Runs the test corresponding to
child
, which can be assumed to be an element of the list returned byParentRunner.getChildren()
. - runClasses(Class<?>...) - Static method in class org.junit.runner.JUnitCore
-
Run the tests contained in
classes
. - runClasses(Computer, Class<?>...) - Static method in class org.junit.runner.JUnitCore
-
Run the tests contained in
classes
. - runLeaf(Statement, Description, RunNotifier) - Method in class org.junit.runners.ParentRunner
-
Runs a
Statement
that represents a leaf (aka atomic) test. - RunListener - Class in org.junit.runner.notification
-
If you need to respond to the events during a test run, extend
RunListener
and override the appropriate methods. - RunListener() - Constructor for class org.junit.runner.notification.RunListener
- runner(Runner) - Static method in class org.junit.runner.Request
- Runner - Class in org.junit.runner
-
A
Runner
runs tests and notifies aRunNotifier
of significant events as it does so. - Runner() - Constructor for class org.junit.runner.Runner
- RunnerBuilder - Class in org.junit.runners.model
-
A RunnerBuilder is a strategy for constructing runners for classes.
- RunnerBuilder() - Constructor for class org.junit.runners.model.RunnerBuilder
- runnerForClass(Class<?>) - Method in class org.junit.runners.model.RunnerBuilder
-
Override to calculate the correct runner for a test class at runtime.
- runners(Class<?>, Class<?>[]) - Method in class org.junit.runners.model.RunnerBuilder
-
Constructs and returns a list of Runners, one for each child class in
children
. - runners(Class<?>, List<Class<?>>) - Method in class org.junit.runners.model.RunnerBuilder
- RunnerScheduler - Interface in org.junit.runners.model
-
Represents a strategy for scheduling when individual test methods should be run (in serial or parallel) WARNING: still experimental, may go away.
- RunNotifier - Class in org.junit.runner.notification
-
If you write custom runners, you may need to notify JUnit of your progress running tests.
- RunNotifier() - Constructor for class org.junit.runner.notification.RunNotifier
- RunRules - Class in org.junit.rules
-
Runs a collection of rules on a statement.
- RunRules(Statement, Iterable<TestRule>, Description) - Constructor for class org.junit.rules.RunRules
- RunWith - Annotation Type in org.junit.runner
-
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. - runWithAssignment(Assignments) - Method in class org.junit.experimental.theories.Theories.TheoryAnchor
- runWithCompleteAssignment(Assignments) - Method in class org.junit.experimental.theories.Theories.TheoryAnchor
- runWithIncompleteAssignment(Assignments) - Method in class org.junit.experimental.theories.Theories.TheoryAnchor
S
- safeRunnerForClass(Class<?>) - Method in class org.junit.runners.model.RunnerBuilder
-
Always returns a runner, even if it is just one that prints an error instead of running tests.
- schedule(Runnable) - Method in interface org.junit.runners.model.RunnerScheduler
-
Schedule a child statement to run
- serial() - Static method in class org.junit.runner.Computer
-
Returns a new default computer, which runs tests in serial order
- setScheduler(RunnerScheduler) - Method in class org.junit.runners.ParentRunner
-
Sets a scheduler that determines the order and parallelization of children.
- shouldRun(Description) - Method in class org.junit.experimental.categories.Categories.CategoryFilter
- shouldRun(Description) - Method in class org.junit.runner.manipulation.Filter
- signatures(Constructor<?>) - Static method in class org.junit.experimental.theories.ParameterSignature
- signatures(Method) - Static method in class org.junit.experimental.theories.ParameterSignature
- skipped(AssumptionViolatedException, Description) - Method in class org.junit.rules.TestWatcher
-
Invoked when a test is skipped due to a failed assumption.
- sort(Sorter) - Method in interface org.junit.runner.manipulation.Sortable
-
Sorts the tests using
sorter
- sort(Sorter) - Method in class org.junit.runners.ParentRunner
- Sortable - Interface in org.junit.runner.manipulation
-
Interface for runners that allow sorting of tests.
- sortedLeavesForTest(Request) - Method in class org.junit.experimental.max.MaxCore
- Sorter - Class in org.junit.runner.manipulation
-
A
Sorter
orders tests. - Sorter(Comparator<Description>) - Constructor for class org.junit.runner.manipulation.Sorter
-
Creates a
Sorter
that usescomparator
to sort tests - sortRequest(Request) - Method in class org.junit.experimental.max.MaxCore
- sortWith(Comparator<Description>) - Method in class org.junit.runner.Request
-
Returns a Request whose Tests can be run in a certain order, defined by
comparator
For example, here is code to run a test suite in alphabetical order: - starting(Description) - Method in class org.junit.rules.TestName
- starting(Description) - Method in class org.junit.rules.TestWatcher
-
Invoked when a test is about to start
- starting(FrameworkMethod) - Method in class org.junit.rules.TestWatchman
-
Deprecated.Invoked when a test method is about to start
- Statement - Class in org.junit.runners.model
-
Represents one or more actions to be taken at runtime in the course of running a JUnit test suite.
- Statement() - Constructor for class org.junit.runners.model.Statement
- StoppedByUserException - Exception in org.junit.runner.notification
-
Thrown when a user has requested that the test run stop.
- StoppedByUserException() - Constructor for exception org.junit.runner.notification.StoppedByUserException
- storedLocally(File) - Static method in class org.junit.experimental.max.MaxCore
-
Create a new MaxCore from a serialized file stored at storedResults
- succeeded(Description) - Method in class org.junit.rules.TestWatcher
-
Invoked when a test succeeds
- succeeded(FrameworkMethod) - Method in class org.junit.rules.TestWatchman
-
Deprecated.Invoked when a test method succeeds
- Suite - Class in org.junit.runners
-
Using
Suite
as a runner allows you to manually build a suite containing tests from many classes. - Suite(Class<?>, Class<?>[]) - Constructor for class org.junit.runners.Suite
-
Call this when the default builder is good enough.
- Suite(Class<?>, List<Runner>) - Constructor for class org.junit.runners.Suite
-
Called by this class and subclasses once the runners making up the suite have been determined
- Suite(Class<?>, RunnerBuilder) - Constructor for class org.junit.runners.Suite
-
Called reflectively on classes annotated with
@RunWith(Suite.class)
- Suite(RunnerBuilder, Class<?>[]) - Constructor for class org.junit.runners.Suite
-
Call this when there is no single root class (for example, multiple class names passed on the command line to
JUnitCore
- Suite(RunnerBuilder, Class<?>, Class<?>[]) - Constructor for class org.junit.runners.Suite
-
Called by this class and subclasses once the classes making up the suite have been determined
- Suite.SuiteClasses - Annotation Type in org.junit.runners
-
The
SuiteClasses
annotation specifies the classes to be run when a class annotated with@RunWith(Suite.class)
is run.
T
- TemporaryFolder - Class in org.junit.rules
-
The TemporaryFolder Rule allows creation of files and folders that are guaranteed to be deleted when the test method finishes (whether it passes or fails):
- TemporaryFolder() - Constructor for class org.junit.rules.TemporaryFolder
- TemporaryFolder(File) - Constructor for class org.junit.rules.TemporaryFolder
- Test - Annotation Type in org.junit
-
The
Test
annotation tells JUnit that thepublic void
method to which it is attached can be run as a test case. - TEST_MECHANISM - Static variable in class org.junit.runner.Description
-
Describes a step in the test-running mechanism that goes so wrong no other description can be used (for example, an exception thrown from a Runner's constructor
- Test.None - Class in org.junit
-
Default empty exception
- testAssumptionFailure(Failure) - Method in class org.junit.runner.notification.RunListener
-
Called when an atomic test flags that it assumes a condition that is false
- TestClass - Class in org.junit.runners.model
-
Wraps a class to be run, providing method validation and annotation searching
- TestClass(Class<?>) - Constructor for class org.junit.runners.model.TestClass
-
Creates a
TestClass
wrappingklass
. - testComparator() - Method in class org.junit.experimental.max.MaxHistory
- testCount() - Method in class org.junit.runner.Description
- testCount() - Method in class org.junit.runner.Runner
- TestedOn - Annotation Type in org.junit.experimental.theories.suppliers
- TestedOnSupplier - Class in org.junit.experimental.theories.suppliers
- TestedOnSupplier() - Constructor for class org.junit.experimental.theories.suppliers.TestedOnSupplier
- testFailure(Failure) - Method in class org.junit.runner.notification.RunListener
-
Called when an atomic test fails.
- testFinished(Description) - Method in class org.junit.runner.notification.RunListener
-
Called when an atomic test has finished, whether the test succeeds or fails.
- testIgnored(Description) - Method in class org.junit.runner.notification.RunListener
-
Called when a test will not be run, generally because a test method is annotated with
Ignore
. - testName(FrameworkMethod) - Method in class org.junit.runners.BlockJUnit4ClassRunner
-
Returns the name that describes
method
forDescription
s. - TestName - Class in org.junit.rules
-
The TestName Rule makes the current test name available inside test methods:
- TestName() - Constructor for class org.junit.rules.TestName
- testResult(Class<?>) - Static method in class org.junit.experimental.results.PrintableResult
-
The result of running JUnit on
type
- testResult(Request) - Static method in class org.junit.experimental.results.PrintableResult
-
The result of running JUnit on Request
request
- TestRule - Interface in org.junit.rules
-
A TestRule is an alteration in how a test method, or set of test methods, is run and reported.
- testRunFinished(Result) - Method in class org.junit.runner.notification.RunListener
-
Called when all tests have finished
- testRunStarted(Description) - Method in class org.junit.runner.notification.RunListener
-
Called before any tests have been run.
- testStarted(Description) - Method in class org.junit.runner.notification.RunListener
-
Called when an atomic test is about to be started.
- TestWatcher - Class in org.junit.rules
-
TestWatcher is a base class for Rules that take note of the testing action, without modifying it.
- TestWatcher() - Constructor for class org.junit.rules.TestWatcher
- TestWatchman - Class in org.junit.rules
-
Deprecated.Use
TestWatcher
(which implementsTestRule
) instead. - TestWatchman() - Constructor for class org.junit.rules.TestWatchman
-
Deprecated.
- Theories - Class in org.junit.experimental.theories
- Theories(Class<?>) - Constructor for class org.junit.experimental.theories.Theories
- Theories.TheoryAnchor - Class in org.junit.experimental.theories
- Theory - Annotation Type in org.junit.experimental.theories
- TheoryAnchor(FrameworkMethod, TestClass) - Constructor for class org.junit.experimental.theories.Theories.TheoryAnchor
- timeout() - Method in annotation type org.junit.Test
-
Optionally specify
timeout
in milliseconds to cause a test method to fail if it takes longer than that number of milliseconds. - Timeout - Class in org.junit.rules
-
The Timeout Rule applies the same timeout to all test methods in a class:
- Timeout(int) - Constructor for class org.junit.rules.Timeout
- toString() - Method in class org.junit.experimental.results.PrintableResult
- toString() - Method in class org.junit.runner.Description
- toString() - Method in class org.junit.runner.notification.Failure
V
- validateConstructor(List<Throwable>) - Method in class org.junit.experimental.theories.Theories
- validateConstructor(List<Throwable>) - Method in class org.junit.runners.BlockJUnit4ClassRunner
-
Adds to
errors
if the test class has more than one constructor, or if the constructor takes parameters. - validateFields(List<Throwable>) - Method in class org.junit.runners.BlockJUnit4ClassRunner
- validateInstanceMethods(List<Throwable>) - Method in class org.junit.runners.BlockJUnit4ClassRunner
-
Deprecated.unused API, will go away in future version
- validateNoNonStaticInnerClass(List<Throwable>) - Method in class org.junit.runners.BlockJUnit4ClassRunner
- validateNoTypeParametersOnArgs(List<Throwable>) - Method in class org.junit.runners.model.FrameworkMethod
- validateOnlyOneConstructor(List<Throwable>) - Method in class org.junit.runners.BlockJUnit4ClassRunner
-
Adds to
errors
if the test class has more than one constructor (do not override) - validatePublicVoid(boolean, List<Throwable>) - Method in class org.junit.runners.model.FrameworkMethod
-
Adds to
errors
if this method: is not public, or returns something other than void, or is static (givenisStatic is false
), or is not static (givenisStatic is true
). - validatePublicVoidNoArg(boolean, List<Throwable>) - Method in class org.junit.runners.model.FrameworkMethod
-
Adds to
errors
if this method: is not public, or takes parameters, or returns something other than void, or is static (givenisStatic is false
), or is not static (givenisStatic is true
). - validatePublicVoidNoArgMethods(Class<? extends Annotation>, boolean, List<Throwable>) - Method in class org.junit.runners.ParentRunner
-
Adds to
errors
if any method in this class is annotated withannotation
, but: is not public, or takes parameters, or returns something other than void, or is static (givenisStatic is false
), or is not static (givenisStatic is true
). - validateTestMethods(List<Throwable>) - Method in class org.junit.experimental.theories.Theories
- validateTestMethods(List<Throwable>) - Method in class org.junit.runners.BlockJUnit4ClassRunner
-
Adds to
errors
for each method annotated with@Test
that is not a public, void instance method with no arguments. - validateZeroArgConstructor(List<Throwable>) - Method in class org.junit.runners.BlockJUnit4ClassRunner
-
Adds to
errors
if the test class's single constructor takes parameters (do not override) - value() - Method in annotation type org.junit.experimental.categories.Categories.ExcludeCategory
- value() - Method in annotation type org.junit.experimental.categories.Categories.IncludeCategory
- value() - Method in annotation type org.junit.experimental.categories.Category
- value() - Method in annotation type org.junit.experimental.theories.ParametersSuppliedBy
- value() - Method in annotation type org.junit.FixMethodOrder
-
Optionally specify
value
to have the methods executed in a particular order - value() - Method in annotation type org.junit.Ignore
-
The optional reason why the test is ignored.
- value() - Method in annotation type org.junit.runner.RunWith
- value() - Method in annotation type org.junit.runners.Parameterized.Parameter
-
Method that returns the index of the parameter in the array returned by the method annotated by
Parameters
.
Index range must start at 0. - value() - Method in annotation type org.junit.runners.Suite.SuiteClasses
- valueOf(String) - Static method in enum org.junit.runners.MethodSorters
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum org.junit.runners.MethodSorters
-
Returns an array containing the constants of this enum type, in the order they are declared.
- Verifier - Class in org.junit.rules
-
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
- Verifier() - Constructor for class org.junit.rules.Verifier
- verify() - Method in class org.junit.rules.ErrorCollector
- verify() - Method in class org.junit.rules.Verifier
-
Override this to add verification logic.
W
- wasSuccessful() - Method in class org.junit.runner.Result
- withAfterClasses(Statement) - Method in class org.junit.runners.ParentRunner
-
Returns a
Statement
: run all non-overridden@AfterClass
methods on this class and superclasses before executingstatement
; all AfterClass methods are always executed: exceptions thrown by previous steps are combined, if necessary, with exceptions from AfterClass methods into aMultipleFailureException
. - withAfters(FrameworkMethod, Object, Statement) - Method in class org.junit.runners.BlockJUnit4ClassRunner
-
Deprecated.Will be private soon: use Rules instead
- withBeforeClasses(Statement) - Method in class org.junit.runners.ParentRunner
-
Returns a
Statement
: run all non-overridden@BeforeClass
methods on this class and superclasses before executingstatement
; if any throws an Exception, stop execution and pass the exception on. - withBefores(FrameworkMethod, Object, Statement) - Method in class org.junit.runners.BlockJUnit4ClassRunner
-
Deprecated.Will be private soon: use Rules instead
- withPotentialTimeout(FrameworkMethod, Object, Statement) - Method in class org.junit.runners.BlockJUnit4ClassRunner
-
Deprecated.Will be private soon: use Rules instead
All Classes All Packages