public final class FlinkAssertions extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.assertj.core.api.InstanceOfAssertFactory<Stream,org.assertj.core.api.ListAssert<Throwable>> |
STREAM_THROWABLE |
| Modifier and Type | Method and Description |
|---|---|
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 <T> FlinkCompletableFutureAssert<T> |
assertThatFuture(CompletableFuture<T> actual)
Create assertion for
CompletableFuture. |
static <T> FlinkCompletableFutureAssert<T> |
assertThatFuture(CompletionStage<T> actual)
Create assertion for
CompletionStage. |
static 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<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 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.public static <T> FlinkCompletableFutureAssert<T> assertThatFuture(CompletableFuture<T> actual)
CompletableFuture.T - the type of the value contained in the CompletableFuture.actual - the actual value.public static <T> FlinkCompletableFutureAssert<T> assertThatFuture(CompletionStage<T> actual)
CompletionStage.T - the type of the value contained in the CompletionStage.actual - the actual value.Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.