gradle
8.4

# fromTestAssertionFailure

open fun fromTestAssertionFailure(failure: Throwable, expected: String, actual: String): TestFailure(source)

Creates a new TestFailure instance from an assertion failure.

#### Return

the new instance

#### Parameters

failure

the assertion failure

expected

the expected value for the failure; can be `null`

actual

the actual value for the failure; can be `null`

open fun fromTestAssertionFailure(failure: Throwable, expected: String, actual: String, causes: List<TestFailure>): TestFailure(source)

Creates a new TestFailure instance from an assertion failure.

#### Return

the new instance

#### Parameters

failure

the assertion failure

expected

the expected value for the failure; can be `null`

actual

the actual value for the failure; can be `null`

causes

the list of cause failures; can be `null`