|
||||||||||
PREV NEXT | FRAMES NO FRAMES All Classes |
Request
that, when processed, will run all the tests
in a class.
Description
as a child of the receiver.
Before
method you need to release them
after the test runs.BeforeClass
method you need to release them
after all the tests in the class have run.Filter
that passes all tests through.
suite()
method).AnnotationsValidator
validates all annotations of a test class,
including its annotated fields and methods.type
,
as determined by calling the Class.isInstance(Object)
method on that type, passing the
the examined object.
type
,
as determined by calling the Class.isInstance(Object)
method on that type, passing the
the examined object.
String
.
String
.
SelfDescribing
value to this description.
SelfDescribing
objects
to the description.
Statement
to implement an additional
test-running rule.
Statement
to implement this
test-running rule.
Statement
to implement this
test-running rule.
Runner
to cause all tests it intends to run
to first be checked with the filter.
target
.
target
using this ordering.
target
using comparator
.
RuleChain
, which encloses the given TestRule
with
the rules of the current RuleChain
.
Assert
instead.assertEquals(double expected, double actual, double delta)
instead
assertEquals(String message, double expected, double actual, double delta)
instead
org.hamcrest.MatcherAssert.assertThat()
org.hamcrest.MatcherAssert.assertThat()
runnable
throws an exception of type expectedThrowable
when
executed.
runnable
throws an exception of type expectedThrowable
when
executed.
StringDescription.toString(SelfDescribing)
.
Assume.assumeTrue(boolean)
.
Assume.assumeTrue(String, boolean)
.
e
is
not null
.
null
array or one or more null
elements in objects
,
the test will halt and be ignored.
actual
satisfies the condition specified by matcher
.
actual
satisfies the condition specified by matcher
.
false
, the test will halt and be ignored.
false
, the test will halt and be ignored.
Description
that is stored as a string.testClass
testClass
.
BlockJUnit4ClassRunner
with parameters support.ParametersRunnerFactory
that creates
BlockJUnit4ClassRunnerWithParameters
.CoreMatchers.both(Matcher)
instead.
TemporaryFolder
instance using the values in this builder.
Timeout
instance using the values in this builder.,
TemporaryFolder
.
Category
annotation.callable
.
matcher
does not match value
.
reason
to the table if matcher
does not match value
.
runnable
does not throw an
exception of type expectedThrowable
when executed.
Statement
: Call ParentRunner.runChild(Object, RunNotifier)
on each object returned by ParentRunner.getChildren()
(subject to any imposed
filter and sort)
Statement
to run all of the tests in the test class.
Request
that, when processed, will run all the tests
in a set of classes.
Request
that, when processed, will run all the tests
in a set of classes with the default Computer
.
Request
that, when processed, will run all the tests
in a class.
errors
a throwable for each problem noted with the test class (available from ParentRunner.getTestClass()
).
assertEquals(String, String)
fails.String
contains the specified
String
anywhere.
String
contains the specified
String
anywhere.
CoreMatchers.containsString(String)
instead.
ValidateWith
.
Statement
that will run the given
statement
, and timeout the operation based
on the values configured in this rule.
Filter
which is only passed by tests that are
not categorized with any of the specified categories.
Filter
which is only passed by tests that are
categorized with any of the specified categories.
Filter
given a FilterFactoryParams
argument.
TestWithParameters
.
Description
named name
.
Description
named name
.
Description
named after testClass
Description
named after testClass
method
against.
ParentRunner.ParentRunner(org.junit.runners.model.TestClass)
.
Description
of a single test named name
in the 'class' named
className
.
Description
of a single test named name
in the class clazz
.
Description
of a single test named name
in the class clazz
.
Description
of a single test named name
in the class clazz
.
Theories
runner.Theories
runner.Ordering
from the given factory class.
Ordering
from the given factory.
Description
for child
, which can be assumed to
be an element of the list returned by ParentRunner.getChildren()
Description
describes a test which is to be run or has been run.DisableOnDebug
Rule allows you to label certain rules to be
disabled when debugging.DisableOnDebug
instance with the timeout specified in
milliseconds.
CoreMatchers.either(Matcher)
instead.
RuleChain
without a TestRule
.
String
ends with the specified
String
.
String
ends with the specified
String
.
operand
, as determined by calling the Object.equals(java.lang.Object)
method on
the examined object.
operand
, as determined by calling the Object.equals(java.lang.Object)
method on
the examined object.
Request
that, when processed, will report an error for the given
test class with the given cause.
Throwable
if anything goes wrong.
Iterable
s that only matches when a single pass over the
examined Iterable
yields items that are all matched by the specified
itemMatcher
.
Iterable
s that only matches when a single pass over the
examined Iterable
yields items that are all matched by the specified
itemMatcher
.
CoreMatchers.everyItem(Matcher)
instead.
FilterFactory
to exclude categories.type
.
ExpectedException
rule allows you to verify that your code
throws a specific exception.Failure
holds a description of the failed test and the
exception that was thrown while running it.Failure
with the given description and exception.
count
failures
filter
.
Filter
.Filter
cannot be created.filter
is applied
Description
matches the given description.
MaxHistory
from file
, or generates a new one that
will be saved to file
.
BlockJUnit4ClassRunner
, but custom runners can make other uses)FrameworkField
for field
.
FrameworkField
and FrameworkMethod
FrameworkMethod
for method
@Theory
method with @FromDataPoints
will limit the
datapoints considered as potential values for that parameter to just the
DataPoints
with the given
name.target
annotationClass
.
annotationClass
.
annotationType
on this method, if
one exists.
Description
.
Failure
s describing tests that failed and the problems they encountered
Timeout
will look for a stuck thread
when the test times out.
AssertionError
if there are more or less than one.
testClass
, using builder
Runner
for this Request
classes
, building Runners with builder
.
TestClass
object wrapping the class to be executed.
string
Iterable
s that only matches when a single pass over the
examined Iterable
yields at least one item that is matched by the specified
itemMatcher
.
Iterable
s that only matches when a single pass over the
examined Iterable
yields at least one item that is equal to the specified
item
.
Iterable
s that only matches when a single pass over the
examined Iterable
yields at least one item that is equal to the specified
item
.
Iterable
s that only matches when a single pass over the
examined Iterable
yields at least one item that is matched by the specified
itemMatcher
.
CoreMatchers.hasItem(Object)
instead.
CoreMatchers.hasItem(Matcher)
instead.
Iterable
s that matches when consecutive passes over the
examined Iterable
yield at least one item that is matched by the corresponding
matcher from the specified itemMatchers
.
Iterable
s that matches when consecutive passes over the
examined Iterable
yield at least one item that is equal to the corresponding
item from the specified items
.
Iterable
s that matches when consecutive passes over the
examined Iterable
yield at least one item that is equal to the corresponding
item from the specified items
.
Iterable
s that matches when consecutive passes over the
examined Iterable
yield at least one item that is matched by the corresponding
matcher from the specified itemMatchers
.
CoreMatchers.hasItems(Object...)
instead.
CoreMatchers.hasItems(Matcher...)
instead.
string
FilterFactory
to include categories.InitializationError
with one or more
errors errors
as causes
InitializationError
with one cause
with message string
type
,
as determined by calling the Class.isInstance(Object)
method on that type, passing the
the examined object.
type
,
as determined by calling the Class.isInstance(Object)
method on that type, passing the
the examined object.
second
Runner
s in case the class under test is not valid.target
with
parameters params
.
is(equalTo(x))
.
is(equalTo(x))
.
is(instanceOf(SomeClass.class))
.
is(instanceOf(SomeClass.class))
.
true
.true
if the JVM is in debug mode.
Object.equals(java.lang.Object)
invokedMethod?true
if the error is considered a failure
(i.e.
FrameworkMethod
s are ignored based on the
Ignore
annotation.
JUnitCore
is a facade for running tests.args
.
Filter
that only runs the single method described by
desiredDescription
Request
that, when processed, will run a single test.
method
passes, or throws an exception if method
fails.
Statement
that invokes method
on test
Timeout
that will timeout a test after the
given duration, in milliseconds.
Throwable
s into one exception.Assert.assertThrows
can be used to verify that your code throws a specific
exception.
not(equalTo(x))
.
not(equalTo(x))
.
not(nullValue())
.
not(nullValue(X.class)).
notNullValue() -
Static method in class org.hamcrest.CoreMatchers
A shortcut to the frequently used not(nullValue())
.
notNullValue(Class<T>) -
Static method in class org.hamcrest.CoreMatchers
A shortcut to the frequently used not(nullValue(X.class)).
NULL -
Static variable in class org.junit.runner.manipulation.Sorter
NULL is a Sorter
that leaves elements in an undefined order
nullValue() -
Static method in class org.hamcrest.core.IsNull
Creates a matcher that matches if examined object is null
.
nullValue(Class<T>) -
Static method in class org.hamcrest.core.IsNull
Creates a matcher that matches if examined object is null
.
nullValue() -
Static method in class org.hamcrest.CoreMatchers
Creates a matcher that matches if examined object is null
.
nullValue(Class<T>) -
Static method in class org.hamcrest.CoreMatchers
Creates a matcher that matches if examined object is null
.
O
- or(Matcher<? super X>) -
Method in class org.hamcrest.core.CombinableMatcher.CombinableEitherMatcher
-
- or(Matcher<? super T>) -
Method in class org.hamcrest.core.CombinableMatcher
-
- order(Orderer) -
Method in class junit.framework.JUnit4TestAdapter
- Orders the tests using
orderer
- order(Orderer) -
Method in interface org.junit.runner.manipulation.Orderable
- Orders the tests using
orderer
- order(Collection<Description>) -
Method in class org.junit.runner.manipulation.Orderer
- Orders the descriptions.
- order(Orderer) -
Method in class org.junit.runners.ParentRunner
- Implementation of
Orderable.order(Orderer)
.
- Orderable - Interface in org.junit.runner.manipulation
- Interface for runners that allow ordering of tests.
- Orderer - Class in org.junit.runner.manipulation
- Orders tests.
- Ordering - Class in org.junit.runner.manipulation
- Reorders tests.
- Ordering() -
Constructor for class org.junit.runner.manipulation.Ordering
-
- Ordering.Context - Class in org.junit.runner.manipulation
- Context about the ordering being applied.
- Ordering.Factory - Interface in org.junit.runner.manipulation
- Factory for creating
Ordering
instances. - orderItems(Collection<Description>) -
Method in class org.junit.runner.manipulation.Ordering
- Implemented by sub-classes to order the descriptions.
- orderItems(Collection<Description>) -
Method in class org.junit.runner.manipulation.Sorter
- Implemented by sub-classes to order the descriptions.
- OrderWith - Annotation Type in org.junit.runner
- When a test class is annotated with
@OrderWith
or extends a class annotated
with @OrderWith
, JUnit will order the tests in the test class (and child
test classes, if any) using the ordering defined by the Ordering
class. - orderWith(Ordering) -
Method in class org.junit.runner.Request
- Returns a Request whose Tests can be run in a certain order, defined by
ordering
- OrderWithValidator - Class in org.junit.runner
- Validates that there are no errors in the use of the
OrderWith
annotation. - OrderWithValidator() -
Constructor for class org.junit.runner.OrderWithValidator
-
- org.hamcrest - package org.hamcrest
- The stable API defining Matcher and its associated interfaces and classes.
- org.hamcrest.core - package org.hamcrest.core
- Fundamental matchers of objects and values, and composite matchers.
- 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.function - package org.junit.function
-
- org.junit.matchers - package org.junit.matchers
- Provides useful additional
Matcher
s for use with
the Assert.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
- Provides classes to
filter
or sort
tests. - 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
-
- org.junit.runners.parameterized - package org.junit.runners.parameterized
-
- org.junit.validator - package org.junit.validator
-
- outerRule(TestRule) -
Static method in class org.junit.rules.RuleChain
- Returns a
RuleChain
with a single TestRule
.
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.AfterParam - Annotation Type in org.junit.runners
- Annotation for
public static void
methods which should be executed after
evaluating tests with particular parameters. - Parameterized.BeforeParam - Annotation Type in org.junit.runners
- Annotation for
public static void
methods which should be executed before
evaluating tests with particular parameters. - 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
. - 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
. - Parameterized.UseParametersRunnerFactory - Annotation Type in org.junit.runners
- Add this annotation to your test class if you want to generate a special
runner.
- ParameterSignature - Class in org.junit.experimental.theories
-
- ParametersRunnerFactory - Interface in org.junit.runners.parameterized
- A
ParametersRunnerFactory
creates a runner for a single
TestWithParameters
. - ParametersSuppliedBy - Annotation Type in org.junit.experimental.theories
- 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 - Class in org.junit.experimental.theories
- Abstract parent class for suppliers of input data points for theories.
- ParameterSupplier() -
Constructor for class org.junit.experimental.theories.ParameterSupplier
-
- parentFolder(File) -
Method in class org.junit.rules.TemporaryFolder.Builder
- Specifies which folder to use for creating temporary resources.
- 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
- ParentRunner(TestClass) -
Constructor for class org.junit.runners.ParentRunner
- Constructs a new
ParentRunner
that will run the TestClass
.
- pause(boolean) -
Method in class junit.textui.TestRunner
-
- 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
- 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.
- PotentialAssignment - Class in org.junit.experimental.theories
-
- PotentialAssignment() -
Constructor for class org.junit.experimental.theories.PotentialAssignment
-
- PotentialAssignment.CouldNotGenerateValueException - Exception in org.junit.experimental.theories
-
- PotentialAssignment.CouldNotGenerateValueException() -
Constructor for exception org.junit.experimental.theories.PotentialAssignment.CouldNotGenerateValueException
-
- PotentialAssignment.CouldNotGenerateValueException(Throwable) -
Constructor for exception org.junit.experimental.theories.PotentialAssignment.CouldNotGenerateValueException
-
- 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
- printDefect(TestFailure, int) -
Method in class junit.textui.ResultPrinter
-
- printDefectHeader(TestFailure, int) -
Method in class junit.textui.ResultPrinter
-
- printDefects(Enumeration<TestFailure>, int, String) -
Method in class junit.textui.ResultPrinter
-
- printDefectTrace(TestFailure) -
Method in class junit.textui.ResultPrinter
-
- printErrors(TestResult) -
Method in class junit.textui.ResultPrinter
-
- printFailures(TestResult) -
Method in class junit.textui.ResultPrinter
-
- printFooter(TestResult) -
Method in class junit.textui.ResultPrinter
-
- printHeader(long) -
Method in class junit.textui.ResultPrinter
-
- printStackTrace() -
Method in exception org.junit.runners.model.MultipleFailureException
-
- printStackTrace(PrintStream) -
Method in exception org.junit.runners.model.MultipleFailureException
-
- printStackTrace(PrintWriter) -
Method in exception org.junit.runners.model.MultipleFailureException
-
- processArguments(String[]) -
Method in class junit.runner.BaseTestRunner
- Processes the command line arguments and
returns the name of the suite class to run or null
- 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.
- protect() -
Method in interface junit.framework.Protectable
- Run the following method protected.
- Protectable - Interface in junit.framework
- A Protectable can be run and can throw a Throwable.
- PublicClassValidator - Class in org.junit.validator
- Validates that a
TestClass
is public. - PublicClassValidator() -
Constructor for class org.junit.validator.PublicClassValidator
-
R
- relationship() -
Method in class org.hamcrest.core.StringContains
-
- relationship() -
Method in class org.hamcrest.core.StringEndsWith
-
- relationship() -
Method in class org.hamcrest.core.StringStartsWith
-
- relationship() -
Method in class org.hamcrest.core.SubstringMatcher
-
- removeListener(TestListener) -
Method in class junit.framework.TestResult
- Unregisters a TestListener.
- 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
- RepeatedTest - Class in junit.extensions
- A Decorator that runs a test repeatedly.
- RepeatedTest(Test, int) -
Constructor for class junit.extensions.RepeatedTest
-
- reportMissingExceptionWithMessage(String) -
Method in class org.junit.rules.ExpectedException
- Specifies the failure message for tests that are expected to throw
an exception but do not throw any.
- 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
- Deprecated. will be private soon.
- ResultPrinter - Class in junit.textui
-
- ResultPrinter(PrintStream) -
Constructor for class junit.textui.ResultPrinter
-
- 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
can be used for creating composite rules. - rules(Object) -
Method in class org.junit.runners.BlockJUnit4ClassRunner
-
- run(TestResult) -
Method in class junit.extensions.ActiveTestSuite
-
- run(TestResult) -
Method in class junit.extensions.RepeatedTest
-
- run(TestResult) -
Method in class junit.extensions.TestDecorator
-
- run(TestResult) -
Method in class junit.extensions.TestSetup
-
- run(TestResult) -
Method in class junit.framework.JUnit4TestAdapter
-
- run(TestResult) -
Method in class junit.framework.JUnit4TestCaseFacade
-
- run(TestResult) -
Method in interface junit.framework.Test
- Runs a test and collects its result in a TestResult instance.
- run() -
Method in class junit.framework.TestCase
- A convenience method to run this test, collecting the results with a
default TestResult object.
- run(TestResult) -
Method in class junit.framework.TestCase
- Runs the test case and collects the results in TestResult.
- run(TestCase) -
Method in class junit.framework.TestResult
- Runs a TestCase.
- run(TestResult) -
Method in class junit.framework.TestSuite
- Runs the tests and collects their result in a TestResult.
- run(Class<? extends TestCase>) -
Static method in class junit.textui.TestRunner
- Runs a suite extracted from a TestCase subclass.
- run(Test) -
Static method in class junit.textui.TestRunner
- Runs a single test and collects its results.
- run(Class<?>) -
Method in class org.junit.experimental.max.MaxCore
- Run all the tests in
class
.
- run(Request) -
Method in class org.junit.experimental.max.MaxCore
- 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() -
Method in interface org.junit.function.ThrowingRunnable
-
- run(Class<?>...) -
Method in class org.junit.runner.JUnitCore
- Run all the tests in
classes
.
- run(Computer, Class<?>...) -
Method in class org.junit.runner.JUnitCore
- Run all the tests in
classes
.
- run(Request) -
Method in class org.junit.runner.JUnitCore
- Run all the tests contained in
request
.
- run(Test) -
Method in class org.junit.runner.JUnitCore
- Run all the tests contained in JUnit 3.8.x
test
.
- run(Runner) -
Method in class org.junit.runner.JUnitCore
- Do not use.
- run(RunNotifier) -
Method in class org.junit.runner.Runner
- Run the tests for this runner.
- run(RunNotifier) -
Method in class org.junit.runners.ParentRunner
-
- runAndWait(Test) -
Static method in class junit.textui.TestRunner
- Runs a single test and waits until the user
types RETURN.
- runBare() -
Method in class junit.framework.TestCase
- Runs the bare test sequence.
- 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 by ParentRunner.getChildren()
.
- runChild(Runner, RunNotifier) -
Method in class org.junit.runners.Suite
-
- 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
.
- runCount() -
Method in class junit.framework.TestResult
- Gets the number of run tests.
- runFailed(String) -
Method in class junit.runner.BaseTestRunner
- Override to define how to handle a failed loading of
a test suite.
- runFailed(String) -
Method in class junit.textui.TestRunner
-
- runFinished() -
Method in class junit.extensions.ActiveTestSuite
-
- 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
- Register an instance of this class with
RunNotifier
to be notified
of events that occur during a test run. - RunListener() -
Constructor for class org.junit.runner.notification.RunListener
-
- RunListener.ThreadSafe - Annotation Type in org.junit.runner.notification
- Indicates a
RunListener
that can have its methods called
concurrently. - runner(Runner) -
Static method in class org.junit.runner.Request
-
- Runner - Class in org.junit.runner
- A
Runner
runs tests and notifies a RunNotifier
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
-
- runProtected(Test, Protectable) -
Method in class junit.framework.TestResult
- Runs a TestCase.
- 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
-
- runSingleMethod(String, String, boolean) -
Method in class junit.textui.TestRunner
-
- runTest(Test, TestResult) -
Method in class junit.extensions.ActiveTestSuite
-
- runTest() -
Method in class junit.framework.TestCase
- Override to run the test and assert its state.
- runTest(Test, TestResult) -
Method in class junit.framework.TestSuite
-
- runtime(TimeUnit) -
Method in class org.junit.rules.Stopwatch
- Gets the runtime for the test.
- 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 for the given test class.
- sameInstance(T) -
Static method in class org.hamcrest.core.IsSame
- Creates a matcher that matches only when the examined object is the same instance as
the specified target object.
- sameInstance(T) -
Static method in class org.hamcrest.CoreMatchers
- Creates a matcher that matches only when the examined object is the same instance as
the specified target object.
- savePreferences() -
Static method in class junit.runner.BaseTestRunner
-
- scanAnnotatedMembers(Map<Class<? extends Annotation>, List<FrameworkMethod>>, Map<Class<? extends Annotation>, List<FrameworkField>>) -
Method in class org.junit.runners.model.TestClass
-
- schedule(Runnable) -
Method in interface org.junit.runners.model.RunnerScheduler
- Schedule a child statement to run
- seconds(long) -
Static method in class org.junit.rules.Timeout
- Creates a
Timeout
that will timeout a test after the
given duration, in seconds.
- SelfDescribing - Interface in org.hamcrest
- The ability of an object to describe itself.
- serial() -
Static method in class org.junit.runner.Computer
- Returns a new default computer, which runs tests in serial order
- setLoading(boolean) -
Method in class junit.runner.BaseTestRunner
- Sets the loading behaviour of the test runner
- setName(String) -
Method in class junit.framework.TestCase
- Sets the name of a TestCase.
- setName(String) -
Method in class junit.framework.TestSuite
- Sets the name of the suite.
- setPreference(String, String) -
Static method in class junit.runner.BaseTestRunner
-
- setPreferences(Properties) -
Static method in class junit.runner.BaseTestRunner
-
- setPrinter(ResultPrinter) -
Method in class junit.textui.TestRunner
-
- setScheduler(RunnerScheduler) -
Method in class org.junit.runners.ParentRunner
- Sets a scheduler that determines the order and parallelization
of children.
- setUp() -
Method in class junit.extensions.TestSetup
- Sets up the fixture.
- setUp() -
Method in class junit.framework.TestCase
- Sets up the fixture, for example, open a network connection.
- shouldRun(Description) -
Method in class org.junit.experimental.categories.Categories.CategoryFilter
-
- shouldRun(Description) -
Method in class org.junit.runner.manipulation.Filter
-
- shouldStop() -
Method in class junit.framework.TestResult
- Checks whether the test run should stop.
- showStackRaw() -
Static method in class junit.runner.BaseTestRunner
-
- shuffledBy(Random) -
Static method in class org.junit.runner.manipulation.Ordering
- Creates an
Ordering
that shuffles the items using the given
Random
instance.
- signatures(Method) -
Static method in class org.junit.experimental.theories.ParameterSignature
-
- signatures(Constructor<?>) -
Static method in class org.junit.experimental.theories.ParameterSignature
-
- skipped(long, AssumptionViolatedException, Description) -
Method in class org.junit.rules.Stopwatch
- Invoked when a test is skipped due to a failed assumption.
- skipped(AssumptionViolatedException, Description) -
Method in class org.junit.rules.TestWatcher
- Invoked when a test is skipped due to a failed assumption.
- skipped(AssumptionViolatedException, Description) -
Method in class org.junit.rules.TestWatcher
- Deprecated. use
TestWatcher.skipped(AssumptionViolatedException, Description)
- sort(Sorter) -
Method in class junit.framework.JUnit4TestAdapter
-
- 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 uses comparator
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
- start(String[]) -
Method in class junit.textui.TestRunner
- Starts a test run.
- 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
- startsWith(String) -
Static method in class org.hamcrest.core.StringStartsWith
- Creates a matcher that matches if the examined
String
starts with the specified
String
.
- startsWith(String) -
Static method in class org.hamcrest.CoreMatchers
- Creates a matcher that matches if the examined
String
starts with the specified
String
.
- startTest(Test) -
Method in interface junit.framework.TestListener
- A test started.
- startTest(Test) -
Method in class junit.framework.TestResult
- Informs the result that a test will be started.
- startTest(Test) -
Method in class junit.runner.BaseTestRunner
-
- startTest(Test) -
Method in class junit.textui.ResultPrinter
-
- 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
-
- STATUS_ERROR -
Static variable in interface junit.runner.TestRunListener
-
- STATUS_FAILURE -
Static variable in interface junit.runner.TestRunListener
-
- stop() -
Method in class junit.framework.TestResult
- Marks that the test run should stop.
- 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
-
- Stopwatch - Class in org.junit.rules
- The Stopwatch Rule notifies one of its own protected methods of the time spent by a test.
- Stopwatch() -
Constructor for class org.junit.rules.Stopwatch
-
- storedLocally(File) -
Static method in class org.junit.experimental.max.MaxCore
- Create a new MaxCore from a serialized file stored at storedResults
- StringContains - Class in org.hamcrest.core
- Tests if the argument is a string that contains a substring.
- StringContains(String) -
Constructor for class org.hamcrest.core.StringContains
-
- StringDescription - Class in org.hamcrest
- A
Description
that is stored as a string. - StringDescription() -
Constructor for class org.hamcrest.StringDescription
-
- StringDescription(Appendable) -
Constructor for class org.hamcrest.StringDescription
-
- StringEndsWith - Class in org.hamcrest.core
- Tests if the argument is a string that contains a substring.
- StringEndsWith(String) -
Constructor for class org.hamcrest.core.StringEndsWith
-
- StringStartsWith - Class in org.hamcrest.core
- Tests if the argument is a string that contains a substring.
- StringStartsWith(String) -
Constructor for class org.hamcrest.core.StringStartsWith
-
- substring -
Variable in class org.hamcrest.core.SubstringMatcher
-
- SubstringMatcher - Class in org.hamcrest.core
-
- SubstringMatcher(String) -
Constructor for class org.hamcrest.core.SubstringMatcher
-
- succeeded(long, Description) -
Method in class org.junit.rules.Stopwatch
- Invoked when a test succeeds
- 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
- SUCCESS_EXIT -
Static variable in class junit.textui.TestRunner
-
- 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<?>, 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(Class<?>, Class<?>[]) -
Constructor for class org.junit.runners.Suite
- Call this when the default builder is good enough.
- 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(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.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. - SUITE_METHODNAME -
Static variable in class junit.runner.BaseTestRunner
-
T
- tearDown() -
Method in class junit.extensions.TestSetup
- Tears down the fixture.
- tearDown() -
Method in class junit.framework.TestCase
- Tears down the fixture, for example, close a network connection.
- TemporaryFolder - Class in org.junit.rules
- The TemporaryFolder Rule allows creation of files and folders that should
be deleted when the test method finishes (whether it passes or
fails).
- TemporaryFolder() -
Constructor for class org.junit.rules.TemporaryFolder
- Create a temporary folder which uses system default temporary-file
directory to create temporary resources.
- TemporaryFolder(File) -
Constructor for class org.junit.rules.TemporaryFolder
- Create a temporary folder which uses the specified directory to create
temporary resources.
- TemporaryFolder(TemporaryFolder.Builder) -
Constructor for class org.junit.rules.TemporaryFolder
- Create a
TemporaryFolder
initialized with
values from a builder.
- TemporaryFolder.Builder - Class in org.junit.rules
- Builds an instance of
TemporaryFolder
. - TemporaryFolder.Builder() -
Constructor for class org.junit.rules.TemporaryFolder.Builder
-
- Test - Interface in junit.framework
- A Test can be run and collect its results.
- Test - Annotation Type in org.junit
- The
Test
annotation tells JUnit that the public void
method
to which it is attached can be run as a test case. - Test.None - Class in org.junit
- Default empty exception.
- 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
- testAssumptionFailure(Failure) -
Method in class org.junit.runner.notification.RunListener
- Called when an atomic test flags that it assumes a condition that is
false
- testAt(int) -
Method in class junit.framework.TestSuite
- Returns the test at the given index.
- TestCase - Class in junit.framework
- A test case defines the fixture to run multiple tests.
- TestCase() -
Constructor for class junit.framework.TestCase
- No-arg constructor to enable serialization.
- TestCase(String) -
Constructor for class junit.framework.TestCase
- Constructs a test case with the given name.
- 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
wrapping clazz
.
- TestClassValidator - Interface in org.junit.validator
- Validates a single facet of a test class.
- testComparator() -
Method in class org.junit.experimental.max.MaxHistory
-
- TestCouldNotBeSkippedException - Exception in org.junit
- Indicates that a test that indicated that it should be skipped could not be skipped.
- TestCouldNotBeSkippedException(AssumptionViolatedException) -
Constructor for exception org.junit.TestCouldNotBeSkippedException
- Creates an instance using the given assumption failure.
- testCount() -
Method in class junit.framework.TestSuite
- Returns the number of tests in this suite.
- testCount() -
Method in class org.junit.runner.Description
-
- testCount() -
Method in class org.junit.runner.Runner
-
- TestDecorator - Class in junit.extensions
- A Decorator for Tests.
- TestDecorator(Test) -
Constructor for class junit.extensions.TestDecorator
-
- TestedOn - Annotation Type in org.junit.experimental.theories.suppliers
- 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 - Class in org.junit.experimental.theories.suppliers
-
- TestedOnSupplier() -
Constructor for class org.junit.experimental.theories.suppliers.TestedOnSupplier
-
- testEnded(String) -
Method in class junit.runner.BaseTestRunner
-
- testEnded(String) -
Method in interface junit.runner.TestRunListener
-
- testEnded(String) -
Method in class junit.textui.TestRunner
-
- testFailed(int, Test, Throwable) -
Method in class junit.runner.BaseTestRunner
-
- testFailed(int, String, String) -
Method in interface junit.runner.TestRunListener
-
- testFailed(int, Test, Throwable) -
Method in class junit.textui.TestRunner
-
- TestFailure - Class in junit.framework
- A
TestFailure
collects a failed test together with
the caught exception. - TestFailure(Test, Throwable) -
Constructor for class junit.framework.TestFailure
- Constructs a TestFailure with the given test and exception.
- testFailure(Failure) -
Method in class org.junit.runner.notification.RunListener
- Called when an atomic test fails, or when a listener throws an exception.
- 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
.
- TestListener - Interface in junit.framework
- A Listener for test progress
- 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
-
- testName(FrameworkMethod) -
Method in class org.junit.runners.BlockJUnit4ClassRunner
- Returns the name that describes
method
for Description
s.
- testName(FrameworkMethod) -
Method in class org.junit.runners.parameterized.BlockJUnit4ClassRunnerWithParameters
-
- TestResult - Class in junit.framework
- A
TestResult
collects the results of executing
a test case. - TestResult() -
Constructor for class junit.framework.TestResult
-
- 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.
- testRunEnded(long) -
Method in interface junit.runner.TestRunListener
-
- testRunFinished(Result) -
Method in class org.junit.runner.notification.RunListener
- Called when all tests have finished.
- TestRunListener - Interface in junit.runner
- A listener interface for observing the
execution of a test run.
- TestRunner - Class in junit.textui
- A command line based tool to run tests.
- TestRunner() -
Constructor for class junit.textui.TestRunner
- Constructs a TestRunner.
- TestRunner(PrintStream) -
Constructor for class junit.textui.TestRunner
- Constructs a TestRunner using the given stream for all the output
- TestRunner(ResultPrinter) -
Constructor for class junit.textui.TestRunner
- Constructs a TestRunner using the given ResultPrinter all the output
- testRunStarted(String, int) -
Method in interface junit.runner.TestRunListener
-
- testRunStarted(Description) -
Method in class org.junit.runner.notification.RunListener
- Called before any tests have been run.
- testRunStopped(long) -
Method in interface junit.runner.TestRunListener
-
- tests() -
Method in class junit.framework.TestSuite
- Returns the tests as an enumeration.
- TestSetup - Class in junit.extensions
- A Decorator to set up and tear down additional fixture state.
- TestSetup(Test) -
Constructor for class junit.extensions.TestSetup
-
- testStarted(String) -
Method in class junit.runner.BaseTestRunner
-
- testStarted(String) -
Method in interface junit.runner.TestRunListener
-
- testStarted(String) -
Method in class junit.textui.TestRunner
-
- testStarted(Description) -
Method in class org.junit.runner.notification.RunListener
- Called when an atomic test is about to be started.
- TestSuite - Class in junit.framework
- A
TestSuite
is a Composite
of Tests. - TestSuite() -
Constructor for class junit.framework.TestSuite
- Constructs an empty TestSuite.
- TestSuite(Class<?>) -
Constructor for class junit.framework.TestSuite
- Constructs a TestSuite from the given class.
- TestSuite(Class<? extends TestCase>, String) -
Constructor for class junit.framework.TestSuite
- Constructs a TestSuite from the given class with the given name.
- TestSuite(String) -
Constructor for class junit.framework.TestSuite
- Constructs an empty TestSuite.
- TestSuite(Class<?>...) -
Constructor for class junit.framework.TestSuite
- Constructs a TestSuite from the given array of classes.
- TestSuite(Class<? extends TestCase>[], String) -
Constructor for class junit.framework.TestSuite
- Constructs a TestSuite from the given array of classes with the given name.
- testSuiteFinished(Description) -
Method in class org.junit.runner.notification.RunListener
- Called when a test suite has finished, whether the test suite succeeds or fails.
- testSuiteStarted(Description) -
Method in class org.junit.runner.notification.RunListener
- Called when a test suite is about to be started.
- TestTimedOutException - Exception in org.junit.runners.model
- Exception thrown when a test fails on timeout.
- TestTimedOutException(long, TimeUnit) -
Constructor for exception org.junit.runners.model.TestTimedOutException
- Creates exception with a standard message "test timed out after [timeout] [timeUnit]"
- 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 implements TestRule
) instead. - TestWatchman() -
Constructor for class org.junit.rules.TestWatchman
- Deprecated.
- TestWithParameters - Class in org.junit.runners.parameterized
- A
TestWithParameters
keeps the data together that are needed for
creating a runner for a single data set of a parameterized test. - TestWithParameters(String, TestClass, List<Object>) -
Constructor for class org.junit.runners.parameterized.TestWithParameters
-
- theInstance(T) -
Static method in class org.hamcrest.core.IsSame
- Creates a matcher that matches only when the examined object is the same instance as
the specified target object.
- theInstance(T) -
Static method in class org.hamcrest.CoreMatchers
- Creates a matcher that matches only when the examined object is the same instance as
the specified target object.
- then(Condition.Step<? super T, U>) -
Method in class org.hamcrest.Condition
-
- Theories - Class in org.junit.experimental.theories
- The Theories runner allows to test a certain functionality against a subset of an infinite set of data points.
- Theories(Class<?>) -
Constructor for class org.junit.experimental.theories.Theories
-
- Theories(TestClass) -
Constructor for class org.junit.experimental.theories.Theories
-
- Theories.TheoryAnchor - Class in org.junit.experimental.theories
-
- Theories.TheoryAnchor(FrameworkMethod, TestClass) -
Constructor for class org.junit.experimental.theories.Theories.TheoryAnchor
-
- Theory - Annotation Type in org.junit.experimental.theories
- Marks test methods that should be read as theories by the
Theories
runner. - ThrowingRunnable - Interface in org.junit.function
- This interface facilitates the use of
Assert.assertThrows(Class, ThrowingRunnable)
from Java 8. - thrownException() -
Method in class junit.framework.TestFailure
- Gets the thrown exception.
- 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
- Deprecated.
- Timeout(long, TimeUnit) -
Constructor for class org.junit.rules.Timeout
- Create a
Timeout
instance with the timeout specified
at the timeUnit of granularity of the provided TimeUnit
.
- Timeout(Timeout.Builder) -
Constructor for class org.junit.rules.Timeout
- Create a
Timeout
instance initialized with values from
a builder.
- Timeout.Builder - Class in org.junit.rules
- Builder for
Timeout
. - Timeout.Builder() -
Constructor for class org.junit.rules.Timeout.Builder
-
- toString() -
Method in class junit.extensions.RepeatedTest
-
- toString() -
Method in class junit.extensions.TestDecorator
-
- toString() -
Method in class junit.framework.JUnit4TestAdapter
-
- toString() -
Method in class junit.framework.JUnit4TestCaseFacade
-
- toString() -
Method in class junit.framework.TestCase
- Returns a string representation of the test case.
- toString() -
Method in class junit.framework.TestFailure
- Returns a short description of the failure.
- toString() -
Method in class junit.framework.TestSuite
-
- toString() -
Method in class org.hamcrest.BaseMatcher
-
- toString() -
Method in class org.hamcrest.Description.NullDescription
-
- toString(SelfDescribing) -
Static method in class org.hamcrest.StringDescription
- Return the description of a
SelfDescribing
object as a String.
- toString() -
Method in class org.hamcrest.StringDescription
- Returns the description as a string.
- toString() -
Method in class org.junit.experimental.categories.Categories.CategoryFilter
- Returns string in the form "[included categories] - [excluded categories]", where both
sets have comma separated names of categories.
- 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
-
- toString() -
Method in class org.junit.runners.model.FrameworkField
-
- toString() -
Method in class org.junit.runners.model.FrameworkMethod
-
- toString() -
Method in class org.junit.runners.parameterized.TestWithParameters
-
- trace() -
Method in class junit.framework.TestFailure
- Returns a String containing the stack trace of the error
thrown by TestFailure.
- truncate(String) -
Static method in class junit.runner.BaseTestRunner
- Truncates a String to the maximum length.
- TypeSafeDiagnosingMatcher<T> - Class in org.hamcrest
- Convenient base class for Matchers that require a non-null value of a specific type
and that will report why the received value has been rejected.
- TypeSafeDiagnosingMatcher(Class<?>) -
Constructor for class org.hamcrest.TypeSafeDiagnosingMatcher
- Use this constructor if the subclass that implements
matchesSafely
is not the class that binds <T> to a type.
- TypeSafeDiagnosingMatcher(ReflectiveTypeFinder) -
Constructor for class org.hamcrest.TypeSafeDiagnosingMatcher
- Use this constructor if the subclass that implements
matchesSafely
is not the class that binds <T> to a type.
- TypeSafeDiagnosingMatcher() -
Constructor for class org.hamcrest.TypeSafeDiagnosingMatcher
- The default constructor for simple sub types
- TypeSafeMatcher<T> - Class in org.hamcrest
- Convenient base class for Matchers that require a non-null value of a specific type.
- TypeSafeMatcher() -
Constructor for class org.hamcrest.TypeSafeMatcher
- The default constructor for simple sub types
- TypeSafeMatcher(Class<?>) -
Constructor for class org.hamcrest.TypeSafeMatcher
- Use this constructor if the subclass that implements
matchesSafely
is not the class that binds <T> to a type.
- TypeSafeMatcher(ReflectiveTypeFinder) -
Constructor for class org.hamcrest.TypeSafeMatcher
- Use this constructor if the subclass that implements
matchesSafely
is not the class that binds <T> to a type.
U
- useReloadingTestSuiteLoader() -
Method in class junit.runner.BaseTestRunner
-
V
- validateAnnotatedClass(TestClass) -
Method in class org.junit.runner.OrderWithValidator
- Adds to
errors
a throwable for each problem detected.
- validateAnnotatedClass(TestClass) -
Method in class org.junit.validator.AnnotationValidator
- Validates annotation on the given class.
- validateAnnotatedField(FrameworkField) -
Method in class org.junit.validator.AnnotationValidator
- Validates annotation on the given field.
- validateAnnotatedMethod(FrameworkMethod) -
Method in class org.junit.experimental.categories.CategoryValidator
- Adds to
errors
a throwable for each problem detected.
- validateAnnotatedMethod(FrameworkMethod) -
Method in class org.junit.validator.AnnotationValidator
- Validates annotation on the given method.
- 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.
- validateConstructor(List<Throwable>) -
Method in class org.junit.runners.parameterized.BlockJUnit4ClassRunnerWithParameters
-
- validateFields(List<Throwable>) -
Method in class org.junit.runners.BlockJUnit4ClassRunner
-
- validateFields(List<Throwable>) -
Method in class org.junit.runners.parameterized.BlockJUnit4ClassRunnerWithParameters
-
- validateInstanceMethods(List<Throwable>) -
Method in class org.junit.runners.BlockJUnit4ClassRunner
- Deprecated.
- 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 (given isStatic is false
), or
is not static (given isStatic 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 (given isStatic is false
), or
is not static (given isStatic 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 with
annotation
, but:
is not public, or
takes parameters, or
returns something other than void, or
is static (given isStatic is false
), or
is not static (given isStatic is true
).
- validateTestClass(TestClass) -
Method in class org.junit.validator.AnnotationsValidator
- Validate all annotations of the specified test class that are be
annotated with
ValidateWith
.
- validateTestClass(TestClass) -
Method in class org.junit.validator.PublicClassValidator
- Validate that the specified
TestClass
is public.
- validateTestClass(TestClass) -
Method in interface org.junit.validator.TestClassValidator
- Validate a single facet of a test class.
- 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.
- ValidateWith - Annotation Type in org.junit.validator
- Allows for an
AnnotationValidator
to be attached to an annotation. - 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)
- 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.
- Version - Class in junit.runner
- This class defines the current version of JUnit
W
- warning(String) -
Static method in class junit.framework.TestSuite
- Returns a test which will fail and log a warning message.
- wasSuccessful() -
Method in class junit.framework.TestResult
- Returns whether the entire test was successful or not.
- 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 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
.
- withAfters(FrameworkMethod, Object, Statement) -
Method in class org.junit.runners.BlockJUnit4ClassRunner
- 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
.
- withBeforeClasses(Statement) -
Method in class org.junit.runners.ParentRunner
- 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.
- withBefores(FrameworkMethod, Object, Statement) -
Method in class org.junit.runners.BlockJUnit4ClassRunner
- 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.
- withInterruptIsolation(Statement) -
Method in class org.junit.runners.ParentRunner
-
- withLookingForStuckThread(boolean) -
Method in class org.junit.rules.Timeout.Builder
- Specifies whether to look for a stuck thread.
- withPotentialTimeout(FrameworkMethod, Object, Statement) -
Method in class org.junit.runners.BlockJUnit4ClassRunner
- Deprecated.
- withTimeout(long, TimeUnit) -
Method in class org.junit.rules.Timeout.Builder
- Specifies the time to wait before timing out the test.
_
- _dont_implement_Matcher___instead_extend_BaseMatcher_() -
Method in class org.hamcrest.BaseMatcher
- Deprecated.
- _dont_implement_Matcher___instead_extend_BaseMatcher_() -
Method in interface org.hamcrest.Matcher
- Deprecated. to make
A B C D E F G H I J L M N O P R S T U V W _
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Copyright © 2002–2020 JUnit. All rights reserved.