- 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.
- 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 - 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.
- AllOf<T> - Class in org.hamcrest.core
-
Calculates the logical conjunction of two matchers.
- AllOf(Iterable<Matcher<? extends T>>) - Constructor for class org.hamcrest.core.AllOf
-
- allOf(Matcher<? extends T>...) - Static method in class org.hamcrest.core.AllOf
-
Evaluates to true only if ALL of the passed in matchers evaluate to true.
- allOf(Iterable<Matcher<? extends T>>) - Static method in class org.hamcrest.core.AllOf
-
Evaluates to true only if ALL of the passed in matchers evaluate to true.
- 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.
- any(Class<T>) - Static method in class org.hamcrest.core.IsAnything
-
This matcher always evaluates to true.
- AnyOf<T> - Class in org.hamcrest.core
-
Calculates the logical disjunction of two matchers.
- AnyOf(Iterable<Matcher<? extends T>>) - Constructor for class org.hamcrest.core.AnyOf
-
- anyOf(Matcher<? extends T>...) - Static method in class org.hamcrest.core.AnyOf
-
Evaluates to true if ANY of the passed in matchers evaluate to true.
- anyOf(Iterable<Matcher<? extends T>>) - Static method in class org.hamcrest.core.AnyOf
-
Evaluates to true if ANY of the passed in matchers evaluate to true.
- anything() - Static method in class org.hamcrest.core.IsAnything
-
This matcher always evaluates to true.
- anything(String) - Static method in class org.hamcrest.core.IsAnything
-
This matcher always evaluates to true.
- 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
using comparator
- 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(String, Object[], Object[]) - Static method in class org.junit.Assert
-
Asserts that two object 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(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(char[], char[]) - Static method in class org.junit.Assert
-
Asserts that two char arrays are equal.
- assertArrayEquals(String, short[], short[]) - Static method in class org.junit.Assert
-
Asserts that two short arrays are equal.
- assertArrayEquals(short[], short[]) - Static method in class org.junit.Assert
-
Asserts that two short arrays are equal.
- assertArrayEquals(String, int[], int[]) - Static method in class org.junit.Assert
-
Asserts that two int arrays are equal.
- assertArrayEquals(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(long[], long[]) - Static method in class org.junit.Assert
-
Asserts that two long arrays are equal.
- assertEquals(String, Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects are equal.
- assertEquals(Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects are equal.
- assertEquals(String, double, double, double) - Static method in class org.junit.Assert
-
Asserts that two doubles or 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(String, long, long) - Static method in class org.junit.Assert
-
Asserts that two longs are equal.
- assertEquals(double, double) - Static method in class org.junit.Assert
-
Deprecated.
Use
assertEquals(double expected, double actual, double epsilon)
instead
- assertEquals(String, double, double) - Static method in class org.junit.Assert
-
Deprecated.
Use
assertEquals(String message, double expected, double actual, double epsilon)
instead
- assertEquals(double, double, double) - Static method in class org.junit.Assert
-
Asserts that two doubles or floats are equal to within a positive delta.
- assertEquals(String, Object[], Object[]) - Static method in class org.junit.Assert
-
Deprecated.
use assertArrayEquals
- assertEquals(Object[], Object[]) - Static method in class org.junit.Assert
-
Deprecated.
use assertArrayEquals
- assertFalse(String, boolean) - Static method in class org.junit.Assert
-
Asserts that a condition is false.
- assertFalse(boolean) - Static method in class org.junit.Assert
-
Asserts that a condition is false.
- assertNotNull(String, Object) - Static method in class org.junit.Assert
-
Asserts that an object isn't null.
- assertNotNull(Object) - Static method in class org.junit.Assert
-
Asserts that an object isn't null.
- assertNotSame(String, Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects do not refer to the same object.
- assertNotSame(Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects do not refer to the same object.
- assertNull(String, Object) - Static method in class org.junit.Assert
-
Asserts that an object is null.
- assertNull(Object) - Static method in class org.junit.Assert
-
Asserts that an object is null.
- assertSame(String, Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects refer to the same object.
- assertSame(Object, Object) - Static method in class org.junit.Assert
-
Asserts that two objects refer to the same object.
- assertThat(T, Matcher<T>) - Static method in class org.junit.Assert
-
Asserts that actual
satisfies the condition specified by
matcher
.
- assertThat(String, T, Matcher<T>) - Static method in class org.junit.Assert
-
Asserts that actual
satisfies the condition specified by
matcher
.
- assertTrue(String, boolean) - Static method in class org.junit.Assert
-
Asserts that a condition is true.
- assertTrue(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
-
- 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(T, Matcher<T>) - Static method in class org.junit.Assume
-
Call to assume that actual
satisfies the condition specified by matcher
.
- assumeTrue(boolean) - Static method in class org.junit.Assume
-
If called with an expression evaluating to false
, the test will halt and be ignored.
- fail(String) - Static method in class org.junit.Assert
-
Fails a test with the given message.
- fail() - Static method in class org.junit.Assert
-
Fails a test with no message.
- 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.
- 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
-
- 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
-
- Filterable - Interface in org.junit.runner.manipulation
-
Runners that allow filtering should implement this interface.
- filterWith(Filter) - Method in class org.junit.runner.Request
-
Returns a Request that only contains those tests that should run when
filter
is applied
- filterWith(Description) - Method in class org.junit.runner.Request
-
Returns a Request that only runs contains tests whose
Description
equals
desiredDescription
- 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.
- Ignore - Annotation Type in org.junit
-
Sometimes you want to temporarily disable a test or a group of tests.
- instanceOf(Class<?>) - Static method in class org.hamcrest.core.IsInstanceOf
-
Is the value an instance of a particular type?
- Is<T> - Class in org.hamcrest.core
-
Decorates another Matcher, retaining the behavior but allowing tests
to be slightly more expressive.
- Is(Matcher<T>) - Constructor for class org.hamcrest.core.Is
-
- is(Matcher<T>) - Static method in class org.hamcrest.core.Is
-
Decorates another Matcher, retaining the behavior but allowing tests
to be slightly more expressive.
- is(T) - Static method in class org.hamcrest.core.Is
-
This is a shortcut to the frequently used is(equalTo(x)).
- is(Class<?>) - Static method in class org.hamcrest.core.Is
-
This is a shortcut to the frequently used is(instanceOf(SomeClass.class)).
- IsAnything<T> - Class in org.hamcrest.core
-
A matcher that always returns true
.
- IsAnything() - Constructor for class org.hamcrest.core.IsAnything
-
- IsAnything(String) - Constructor for class org.hamcrest.core.IsAnything
-
- isEmpty() - Method in class org.junit.runner.Description
-
- IsEqual<T> - Class in org.hamcrest.core
-
Is the value equal to another value, as tested by the
Object.equals(java.lang.Object)
invokedMethod?
- IsEqual(T) - Constructor for class org.hamcrest.core.IsEqual
-
- IsInstanceOf - Class in org.hamcrest.core
-
Tests whether the value is an instance of a class.
- IsInstanceOf(Class<?>) - Constructor for class org.hamcrest.core.IsInstanceOf
-
Creates a new instance of IsInstanceOf
- IsNot<T> - Class in org.hamcrest.core
-
Calculates the logical negation of a matcher.
- IsNot(Matcher<T>) - Constructor for class org.hamcrest.core.IsNot
-
- IsNull<T> - Class in org.hamcrest.core
-
Is the value null?
- IsNull() - Constructor for class org.hamcrest.core.IsNull
-
- IsSame<T> - Class in org.hamcrest.core
-
Is the value the same object as another value?
- IsSame(T) - Constructor for class org.hamcrest.core.IsSame
-
- isSuite() - Method in class org.junit.runner.Description
-
- isTest() - Method in class org.junit.runner.Description
-
- sameInstance(T) - Static method in class org.hamcrest.core.IsSame
-
Creates a new instance of IsSame
- shouldRun(Description) - Method in class org.junit.runner.manipulation.Filter
-
- 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.
- 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
- 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:
- 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
-
- 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.