Class GuardAssert<T>
- Type Parameters:
T- the type of value the guard validates
- All Implemented Interfaces:
org.assertj.core.api.Assert<GuardAssert<T>, Guard<T>>, org.assertj.core.api.Descriptable<GuardAssert<T>>, org.assertj.core.api.ExtensionPoints<GuardAssert<T>, Guard<T>>
@NullMarked
public final class GuardAssert<T>
extends org.assertj.core.api.AbstractAssert<GuardAssert<T>, Guard<T>>
AssertJ assertions for
Guard.
Obtain instances via DmxFunAssertions.assertThat(Guard).
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Method Summary
Modifier and TypeMethodDescriptionVerifies that the guard accepts (validates successfully) the given value.Verifies that the guard rejects (fails validation of) the given value.rejectsWithMessage(T value, String message) Verifies that the guard rejects the given value and that at least one rejection message contains the expected string.rejectsWithMessages(T value, String... messages) Verifies that the guard rejects the given value and that for each expected message, at least one rejection message contains it.Methods inherited from class org.assertj.core.api.AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Method Details
-
accepts
Verifies that the guard accepts (validates successfully) the given value.- Parameters:
value- the value to check- Returns:
- this assertion for chaining
-
rejects
Verifies that the guard rejects (fails validation of) the given value.- Parameters:
value- the value to check- Returns:
- this assertion for chaining
-
rejectsWithMessage
Verifies that the guard rejects the given value and that at least one rejection message contains the expected string.- Parameters:
value- the value to checkmessage- the string expected to appear in at least one rejection message- Returns:
- this assertion for chaining
-
rejectsWithMessages
Verifies that the guard rejects the given value and that for each expected message, at least one rejection message contains it.- Parameters:
value- the value to checkmessages- the strings each expected to appear in at least one rejection message- Returns:
- this assertion for chaining
-