Class ValidatedAssert<E,A>

java.lang.Object
org.assertj.core.api.AbstractAssert<ValidatedAssert<E,A>, Validated<E,A>>
dmx.fun.assertj.ValidatedAssert<E,A>
Type Parameters:
E - the error type
A - the value type
All Implemented Interfaces:
org.assertj.core.api.Assert<ValidatedAssert<E,A>, Validated<E,A>>, org.assertj.core.api.Descriptable<ValidatedAssert<E,A>>, org.assertj.core.api.ExtensionPoints<ValidatedAssert<E,A>, Validated<E,A>>

@NullMarked public final class ValidatedAssert<E,A> extends org.assertj.core.api.AbstractAssert<ValidatedAssert<E,A>, Validated<E,A>>
AssertJ assertions for Validated.

Obtain instances via DmxFunAssertions.assertThat(Validated).

  • Field Summary

    Fields inherited from class org.assertj.core.api.AbstractAssert

    actual, info, myself, objects, throwUnsupportedExceptionOnEquals
  • Method Summary

    Modifier and Type
    Method
    Description
    containsValue(A expected)
    Verifies that the Validated is Valid and contains the given value.
    hasError(E expected)
    Verifies that the Validated is Invalid and contains the given error.
    Verifies that the Validated is Invalid.
    Verifies that the Validated is Valid.

    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, withThreadDumpOnError

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.assertj.core.api.Descriptable

    as, as, as, describedAs, describedAs
  • Method Details

    • isValid

      public ValidatedAssert<E,A> isValid()
      Verifies that the Validated is Valid.
      Returns:
      this assertion for chaining
    • isInvalid

      public ValidatedAssert<E,A> isInvalid()
      Verifies that the Validated is Invalid.
      Returns:
      this assertion for chaining
    • containsValue

      public ValidatedAssert<E,A> containsValue(A expected)
      Verifies that the Validated is Valid and contains the given value.
      Parameters:
      expected - the expected value
      Returns:
      this assertion for chaining
    • hasError

      public ValidatedAssert<E,A> hasError(E expected)
      Verifies that the Validated is Invalid and contains the given error.
      Parameters:
      expected - the expected error
      Returns:
      this assertion for chaining