AssertionFailedError

actual typealias AssertionFailedError = org.opentest4j.AssertionFailedError

AssertionFailedError is a common base class for test-related AssertionErrors.

In addition to a message and a cause, this class stores the expected and actual values of an assertion using the ValueWrapper type.

Author

Sam Brannen

Marc Philipp

Since

1.0

Author

Sam Brannen

Marc Philipp

Constructors

Link copied to clipboard
expect constructor()
actual constructor()

Constructs an AssertionFailedError with an empty message, no cause, and no expected/actual values.

expect constructor(message: String?)
actual constructor(message: String?)

Constructs an AssertionFailedError with a message, no cause, and no expected/actual values.

expect constructor(message: String?, cause: Throwable?)
actual constructor(message: String?, cause: Throwable?)

Constructs an AssertionFailedError with a message and a cause but without expected/actual values.

expect constructor(message: String?, expected: Any?, actual: Any?)
actual constructor(message: String?, expected: Any?, actual: Any?)

Constructs an AssertionFailedError with a message and expected/actual values but without a cause.

expect constructor(message: String?, expected: Any?, actual: Any?, cause: Throwable?)
actual constructor(message: String?, expected: Any?, actual: Any?, cause: Throwable?)

Constructs an AssertionFailedError with a message, expected/actual values, and a cause.

Properties

Link copied to clipboard
Link copied to clipboard

Returns the wrapped actual value if it is defined; otherwise null.

Link copied to clipboard
open override val cause: Throwable?
open val cause: Throwable?
Link copied to clipboard
Link copied to clipboard

Returns the wrapped expected value if it is defined; otherwise null.

Link copied to clipboard
Link copied to clipboard

Returns true if an actual value was supplied via an appropriate constructor.

Link copied to clipboard
Link copied to clipboard

Returns true if an expected value was supplied via an appropriate constructor.

Link copied to clipboard
open val message: String?
open val message: String?

Functions

Link copied to clipboard
open override fun toString(): String