Class AddressAssert
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>
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 -
Method Summary
Modifier and TypeMethodDescriptionaddressContains(String substring) Verifies the email address contains the given substring.hasAddress(String expectedAddress) Verifies the email address.Verifies the address has a display name.Verifies the display name.Verifies the address has no display name.isInDomain(String domain) 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, withThreadDumpOnErrorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
AddressAssert
-
-
Method Details
-
hasAddress
Verifies the email address.- Parameters:
expectedAddress- the expected email address- Returns:
- this assertion object
-
hasName
Verifies the display name.- Parameters:
expectedName- the expected display name- Returns:
- this assertion object
-
hasDisplayName
Verifies the address has a display name.- Returns:
- this assertion object
-
hasNoDisplayName
Verifies the address has no display name.- Returns:
- this assertion object
-
isInDomain
Verifies the email address is in the expected domain.- Parameters:
domain- the expected domain (e.g., "example.com")- Returns:
- this assertion object
-
addressContains
Verifies the email address contains the given substring.- Parameters:
substring- the expected substring- Returns:
- this assertion object
-