Package io.quarkus.test.vertx
Class DefaultUniAsserter
java.lang.Object
io.quarkus.test.vertx.DefaultUniAsserter
- All Implemented Interfaces:
UniAsserter,UnwrappableUniAsserter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> UniAsserterassertEquals(Supplier<io.smallrye.mutiny.Uni<T>> uni, T t) Assert that the value of theUniis equal to the expected value.<T> UniAsserterassertFailedWith(Supplier<io.smallrye.mutiny.Uni<T>> uni, Class<? extends Throwable> c) Used to determine whether theUnicontains the expected failure type.<T> UniAsserterassertFailedWith(Supplier<io.smallrye.mutiny.Uni<T>> uni, Consumer<Throwable> c) Used to determine whether theUnicontains the expected failure.assertFalse(Supplier<io.smallrye.mutiny.Uni<Boolean>> uni) Assert that the value of theUniisfalse.<T> UniAsserterassertNotEquals(Supplier<io.smallrye.mutiny.Uni<T>> uni, T t) Assert that the value of theUniis not equal to the expected value.<T> UniAsserterassertNotNull(Supplier<io.smallrye.mutiny.Uni<T>> uni) Assert that the value of theUniis notnull.<T> UniAsserterassertNotSame(Supplier<io.smallrye.mutiny.Uni<T>> uni, T t) Assert that the value of theUniand the expected value do not refer to the same object.<T> UniAsserterassertNull(Supplier<io.smallrye.mutiny.Uni<T>> uni) Assert that the value of theUniisnull.<T> UniAsserterassertSame(Supplier<io.smallrye.mutiny.Uni<T>> uni, T t) Assert that the value of theUniand the expected value refer to the same object.<T> UniAsserterassertThat(Supplier<io.smallrye.mutiny.Uni<T>> uni, Consumer<T> asserter) Perform a custom assertion on the value of theUniin cases where no exception was thrown.assertTrue(Supplier<io.smallrye.mutiny.Uni<Boolean>> uni) Assert that the value of theUniistrue.io.smallrye.mutiny.Uni<?>asUni()voidClear the test data.Execute some arbitrary operation as part of the pipeline.<T> UniAsserterExecute some arbitrary operation as part of the pipeline.fail()Ensure that the whole pipeline always failsAssociate the value with the given key.<T> UniAssertersurroundWith(Function<io.smallrye.mutiny.Uni<T>, io.smallrye.mutiny.Uni<T>> uni)
-
Field Details
-
execution
io.smallrye.mutiny.Uni<?> execution
-
-
Constructor Details
-
DefaultUniAsserter
public DefaultUniAsserter()
-
-
Method Details
-
asUni
public io.smallrye.mutiny.Uni<?> asUni()- Specified by:
asUniin interfaceUnwrappableUniAsserter- Returns:
- a
Unirepresenting the operations pipeline up to this point
-
assertThat
Description copied from interface:UniAsserterPerform a custom assertion on the value of theUniin cases where no exception was thrown.If an exception is expected, then one of
UniAsserter.assertFailedWith(java.util.function.Supplier<io.smallrye.mutiny.Uni<T>>, java.util.function.Consumer<java.lang.Throwable>)methods should be used.- Specified by:
assertThatin interfaceUniAsserter
-
execute
Description copied from interface:UniAsserterExecute some arbitrary operation as part of the pipeline.- Specified by:
executein interfaceUniAsserter
-
execute
Description copied from interface:UniAsserterExecute some arbitrary operation as part of the pipeline.- Specified by:
executein interfaceUniAsserter
-
assertEquals
Description copied from interface:UniAsserterAssert that the value of theUniis equal to the expected value. If both arenull, they are considered equal.- Specified by:
assertEqualsin interfaceUniAsserter- See Also:
-
assertSame
Description copied from interface:UniAsserterAssert that the value of theUniand the expected value refer to the same object.- Specified by:
assertSamein interfaceUniAsserter
-
assertNull
Description copied from interface:UniAsserterAssert that the value of theUniisnull.If an exception is expected, then one of
UniAsserter.assertFailedWith(java.util.function.Supplier<io.smallrye.mutiny.Uni<T>>, java.util.function.Consumer<java.lang.Throwable>)methods should be used.- Specified by:
assertNullin interfaceUniAsserter
-
assertNotEquals
Description copied from interface:UniAsserterAssert that the value of theUniis not equal to the expected value. Fails if both arenull.- Specified by:
assertNotEqualsin interfaceUniAsserter- See Also:
-
assertNotSame
Description copied from interface:UniAsserterAssert that the value of theUniand the expected value do not refer to the same object.- Specified by:
assertNotSamein interfaceUniAsserter
-
assertNotNull
Description copied from interface:UniAsserterAssert that the value of theUniis notnull.If an exception is expected, then one of
UniAsserter.assertFailedWith(java.util.function.Supplier<io.smallrye.mutiny.Uni<T>>, java.util.function.Consumer<java.lang.Throwable>)methods should be used.- Specified by:
assertNotNullin interfaceUniAsserter
-
surroundWith
public <T> UniAsserter surroundWith(Function<io.smallrye.mutiny.Uni<T>, io.smallrye.mutiny.Uni<T>> uni) - Specified by:
surroundWithin interfaceUniAsserter
-
assertFalse
Description copied from interface:UniAsserterAssert that the value of theUniisfalse.- Specified by:
assertFalsein interfaceUniAsserter
-
assertTrue
Description copied from interface:UniAsserterAssert that the value of theUniistrue.- Specified by:
assertTruein interfaceUniAsserter
-
fail
Description copied from interface:UniAsserterEnsure that the whole pipeline always fails- Specified by:
failin interfaceUniAsserter
-
assertFailedWith
public <T> UniAsserter assertFailedWith(Supplier<io.smallrye.mutiny.Uni<T>> uni, Consumer<Throwable> c) Description copied from interface:UniAsserterUsed to determine whether theUnicontains the expected failure. The assertions fail if theUnidoes not fail.- Specified by:
assertFailedWithin interfaceUniAsserterc- Consumer that performs custom assertions on whether the failure matches expectations. This allows asserting on anything present in theThrowablelike, the cause or the message
-
assertFailedWith
public <T> UniAsserter assertFailedWith(Supplier<io.smallrye.mutiny.Uni<T>> uni, Class<? extends Throwable> c) Description copied from interface:UniAsserterUsed to determine whether theUnicontains the expected failure type. The assertions fail if theUnidoes not fail.- Specified by:
assertFailedWithin interfaceUniAsserter
-
getData
- Specified by:
getDatain interfaceUniAsserter- Returns:
- the test data associated with the given key, or
null - See Also:
-
putData
Description copied from interface:UniAsserterAssociate the value with the given key.- Specified by:
putDatain interfaceUniAsserter- Returns:
- the previous value, or
nullif there was no data for the given key
-
clearData
public void clearData()Description copied from interface:UniAsserterClear the test data.- Specified by:
clearDatain interfaceUniAsserter
-