public class JSR166TestCase
extends java.lang.Object
setUp()
or tearDown()
, make sure to invoke super.setUp
and super.tearDown within them. These methods are used to clear and check for thread
assertion failures.Other notes
Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
eight |
static java.lang.Integer |
five |
static java.lang.Integer |
four |
static long |
LONG_DELAY_MS |
static java.lang.Integer |
m1 |
static java.lang.Integer |
m10 |
static java.lang.Integer |
m2 |
static java.lang.Integer |
m3 |
static java.lang.Integer |
m4 |
static java.lang.Integer |
m5 |
static java.lang.Class<?> |
MAP_CLASS |
static long |
MEDIUM_DELAY_MS |
static java.lang.Integer |
nine |
static java.lang.Integer |
one |
static java.lang.Integer |
seven |
static long |
SHORT_DELAY_MS |
static java.lang.Integer |
six |
static int |
SIZE
The number of elements to place in collections, arrays, etc.
|
static long |
SMALL_DELAY_MS |
static java.lang.Integer |
three |
static java.lang.Integer |
two |
static java.lang.Integer |
zero |
Constructor and Description |
---|
JSR166TestCase() |
Modifier and Type | Method and Description |
---|---|
protected long |
getShortDelay()
Return the shortest timed delay.
|
protected void |
setDelays()
Set delays as multiples of SHORT_DELAY.
|
void |
setUp()
Initialize test to indicate that no thread assertions have failed
|
void |
shouldThrow()
fail with message "should throw exception"
|
void |
tearDown()
Trigger test case failure if any thread assertions have failed
|
void |
threadAssertEquals(long x,
long y)
If arguments not equal, set status to indicate current testcase should fail
|
void |
threadAssertEquals(java.lang.Object x,
java.lang.Object y)
If arguments not equal, set status to indicate current testcase should fail
|
void |
threadAssertFalse(boolean b)
If expression not false, set status to indicate current testcase should fail
|
void |
threadAssertNull(java.lang.Object x)
If argument not null, set status to indicate current testcase should fail
|
void |
threadAssertTrue(boolean b)
If expression not true, set status to indicate current testcase should fail
|
void |
threadFail(java.lang.String reason)
Fail, also setting status to indicate current testcase should fail
|
void |
threadShouldThrow()
threadFail with message "should throw exception"
|
void |
threadUnexpectedException()
threadFail with message "Unexpected exception"
|
void |
unexpectedException()
fail with message "Unexpected exception"
|
public static long SHORT_DELAY_MS
public static long SMALL_DELAY_MS
public static long MEDIUM_DELAY_MS
public static long LONG_DELAY_MS
public static java.lang.Class<?> MAP_CLASS
public static final int SIZE
public static final java.lang.Integer zero
public static final java.lang.Integer one
public static final java.lang.Integer two
public static final java.lang.Integer three
public static final java.lang.Integer four
public static final java.lang.Integer five
public static final java.lang.Integer six
public static final java.lang.Integer seven
public static final java.lang.Integer eight
public static final java.lang.Integer nine
public static final java.lang.Integer m1
public static final java.lang.Integer m2
public static final java.lang.Integer m3
public static final java.lang.Integer m4
public static final java.lang.Integer m5
public static final java.lang.Integer m10
protected long getShortDelay()
protected void setDelays()
public void setUp() throws java.lang.Exception
java.lang.Exception
public void tearDown() throws java.lang.Exception
java.lang.Exception
public void threadFail(java.lang.String reason)
public void threadAssertTrue(boolean b)
public void threadAssertFalse(boolean b)
public void threadAssertNull(java.lang.Object x)
public void threadAssertEquals(long x, long y)
public void threadAssertEquals(java.lang.Object x, java.lang.Object y)
public void threadShouldThrow()
public void threadUnexpectedException()
public void shouldThrow()
public void unexpectedException()