java.lang.Object
org.assertj.core.api.AbstractAssert<AddressAssert,Address>
ch.martinelli.oss.testcontainers.mailpit.assertions.AddressAssert
All Implemented Interfaces:
org.assertj.core.api.Assert<AddressAssert,Address>, org.assertj.core.api.Descriptable<AddressAssert>, org.assertj.core.api.ExtensionPoints<AddressAssert,Address>

public class AddressAssert extends org.assertj.core.api.AbstractAssert<AddressAssert,Address>
AssertJ assertions for Address.

Example usage:


 assertThat(address)
     .hasAddress("user@example.com")
     .hasName("John Doe")
     .isInDomain("example.com");
 
  • Field Summary

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

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Verifies the email address contains the given substring.
    hasAddress(String expectedAddress)
    Verifies the email address.
    Verifies the address has a display name.
    hasName(String expectedName)
    Verifies the display name.
    Verifies the address has no display name.
    Verifies the email address is in the expected domain.

    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 java.lang.Object

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

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

    as, as, as, describedAs, describedAs
  • Constructor Details

    • AddressAssert

      public AddressAssert(Address actual)
  • Method Details

    • hasAddress

      public AddressAssert hasAddress(String expectedAddress)
      Verifies the email address.
      Parameters:
      expectedAddress - the expected email address
      Returns:
      this assertion object
    • hasName

      public AddressAssert hasName(String expectedName)
      Verifies the display name.
      Parameters:
      expectedName - the expected display name
      Returns:
      this assertion object
    • hasDisplayName

      public AddressAssert hasDisplayName()
      Verifies the address has a display name.
      Returns:
      this assertion object
    • hasNoDisplayName

      public AddressAssert hasNoDisplayName()
      Verifies the address has no display name.
      Returns:
      this assertion object
    • isInDomain

      public AddressAssert isInDomain(String domain)
      Verifies the email address is in the expected domain.
      Parameters:
      domain - the expected domain (e.g., "example.com")
      Returns:
      this assertion object
    • addressContains

      public AddressAssert addressContains(String substring)
      Verifies the email address contains the given substring.
      Parameters:
      substring - the expected substring
      Returns:
      this assertion object