S
- the assertion classpublic class MailMessagesAssertions<S extends javax.mail.Message> extends org.assertj.core.api.AbstractAssert<MailMessagesAssertions<S>,javax.mail.Message>
Constructor and Description |
---|
MailMessagesAssertions(javax.mail.Message message)
Create the mail assertion.
|
Modifier and Type | Method and Description |
---|---|
MailMessagesAssertions |
checkByCondition(com.google.common.base.Predicate<javax.mail.Message> predicate)
Assert the message satisfies a predicate.
|
protected Collection<javax.mail.Message> |
getMessages() |
MailMessagesAssertions |
hasRecipients(javax.mail.Message.RecipientType type)
Assert that the message has recipients of a specific type.
|
MailMessagesAssertions |
hasSentDate()
Assert that the message has a title.
|
MailMessagesAssertions |
hasTitle()
Assert that the message has a title.
|
MailMessagesAssertions |
recipientEqualsTo(javax.mail.Message.RecipientType type,
javax.mail.Address[] recipients)
Assert that the recipients field is equal to specified recipients.
|
protected void |
throwException(Throwable e,
org.seedstack.javamail.test.MailAssertionsErrorCodes errorCode)
Utility method to throw exceptions.
|
as, as, asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, overridingErrorMessage, satisfies, setCustomRepresentation, throwAssertionError, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnError
public MailMessagesAssertions(javax.mail.Message message)
message
- the message to consider.public MailMessagesAssertions hasTitle()
public MailMessagesAssertions hasSentDate()
public MailMessagesAssertions hasRecipients(javax.mail.Message.RecipientType type)
type
- the type of recipients to check for.public MailMessagesAssertions recipientEqualsTo(javax.mail.Message.RecipientType type, javax.mail.Address[] recipients)
type
- the recipient type to check for.recipients
- the recipients list to check for.public MailMessagesAssertions checkByCondition(com.google.common.base.Predicate<javax.mail.Message> predicate)
predicate
- the predicate to check for.protected Collection<javax.mail.Message> getMessages()
protected void throwException(Throwable e, org.seedstack.javamail.test.MailAssertionsErrorCodes errorCode)
e
- The throwable to wrap.errorCode
- The error code to use for wrapping.Copyright © 2013-2018–2019 SeedStack. All rights reserved.