The result state of test execution.

  • TestState
    • Basic
      • Identifiable
      • Object
        • Anything
    • Comparable

no subtypes hierarchy

Constructors
abortedshared aborted

A test state is aborted, if its assumption is not met, see e.g. assumeTrue() and it propagates an TestAbortedException.

errorshared error

A test state is error, if it propagates any exception which is not an AssertionError.

failureshared failure

A test state is failure, if it propagates an AssertionError.

skippedshared skipped

A test state is skipped, if its condition is not fullfiled, see TestCondition or e.g ignore() annotation.

successshared success

A test state is success, if it complete normally (that is, does not throw an exception).

Attributes
stringshared actual String string

A developer-friendly string representing the instance. Concatenates the name of the concrete class of the instance with the hash of the instance. Subclasses are encouraged to refine this implementation to produce a more meaningful representation.

Refines Object.string
Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
compareshared actual Comparison compare(TestState other)

Compares this value with the given value, returning:

  • larger, if this value is strictly larger than the given value,
  • smaller, if this value is strictly smaller than the given value, or
  • equal, if this value is equal (equals) to the given value.

For any two values x and y such that the expression x.compare(y) is well-typed, the expression may be written:

x <=> y 

Implementations must respect the constraints that:

  • x==y if and only if x<=>y == equal (consistency with equals()),
  • if x>y then y<x (symmetry), and
  • if x>y and y>z then x>z (transitivity).
Refines Comparable.compare
Inherited Methods
Methods inherited from: Object
equals
Methods inherited from: Comparable<Other>
compare, largerThan, notLargerThan, notSmallerThan, smallerThan