public final class FlinkAssertions extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static org.assertj.core.api.InstanceOfAssertFactory<java.util.stream.Stream,org.assertj.core.api.ListAssert<Throwable>> |
STREAM_THROWABLE |
| 限定符和类型 | 方法和说明 |
|---|---|
static org.assertj.core.api.ThrowingConsumer<? super Throwable> |
anyCauseMatches(Class<? extends Throwable> clazz)
|
static org.assertj.core.api.ThrowingConsumer<? super Throwable> |
anyCauseMatches(Class<? extends Throwable> clazz,
String containsMessage)
|
static org.assertj.core.api.ThrowingConsumer<? super Throwable> |
anyCauseMatches(String containsMessage)
|
static org.assertj.core.api.ListAssert<Throwable> |
assertThatChainOfCauses(Throwable root)
Shorthand to assert chain of causes.
|
static java.util.stream.Stream<Throwable> |
chainOfCauses(Throwable throwable)
You can use this method in combination with
AbstractAssert.extracting(Function, AssertFactory) to perform assertions on a chain
of causes. |
public static final org.assertj.core.api.InstanceOfAssertFactory<java.util.stream.Stream,org.assertj.core.api.ListAssert<Throwable>> STREAM_THROWABLE
chainOfCauses(Throwable)public static org.assertj.core.api.ThrowingConsumer<? super Throwable> anyCauseMatches(Class<? extends Throwable> clazz, String containsMessage)
public static org.assertj.core.api.ThrowingConsumer<? super Throwable> anyCauseMatches(Class<? extends Throwable> clazz)
public static org.assertj.core.api.ThrowingConsumer<? super Throwable> anyCauseMatches(String containsMessage)
public static org.assertj.core.api.ListAssert<Throwable> assertThatChainOfCauses(Throwable root)
assertThat(throwable)
.extracting(FlinkAssertions::chainOfCauses, FlinkAssertions.STREAM_THROWABLE)
public static java.util.stream.Stream<Throwable> chainOfCauses(Throwable throwable)
AbstractAssert.extracting(Function, AssertFactory) to perform assertions on a chain
of causes. For example:
assertThat(throwable)
.extracting(FlinkAssertions::chainOfCauses, FlinkAssertions.STREAM_THROWABLE)
Throwable up to the root cause.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.