public final class PaimonAssertions extends Object
Modifier and Type | Field and Description |
---|---|
static org.assertj.core.api.InstanceOfAssertFactory<java.util.stream.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> PaimonCompletableFutureAssert<T> |
assertThatFuture(CompletableFuture<T> actual)
Create assertion for
CompletableFuture . |
static <T> PaimonCompletableFutureAssert<T> |
assertThatFuture(CompletionStage<T> actual)
Create assertion for
CompletionStage . |
static java.util.stream.Stream<Throwable> |
chainOfCauses(Throwable throwable) |
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(PaimonAssertions::chainOfCauses, PaimonAssertions.STREAM_THROWABLE)
public static java.util.stream.Stream<Throwable> chainOfCauses(Throwable throwable)
public static <T> PaimonCompletableFutureAssert<T> assertThatFuture(CompletableFuture<T> actual)
CompletableFuture
.T
- the type of the value contained in the CompletableFuture
.actual
- the actual value.public static <T> PaimonCompletableFutureAssert<T> assertThatFuture(CompletionStage<T> actual)
CompletionStage
.T
- the type of the value contained in the CompletionStage
.actual
- the actual value.Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.