public class AssertAttachment extends Object
Modifier and Type | Method and Description |
---|---|
static void |
assertEquals(ExpectedAttachment expected,
javax.mail.BodyPart attachment)
It ensures that the values of the received attachment are respected by
checking:
The mimetype of the attachment
The description of the attachment
The disposition of the attachment
The content of the attachment
|
static void |
assertEquals(ExpectedAttachment expected,
javax.mail.Message actual)
Checks if the received email contains the expected attachment.
|
static void |
assertEquals(ExpectedAttachment expected,
javax.mail.Message[] actual)
Shortcut for use with GreenMail.
|
public static void assertEquals(ExpectedAttachment expected, javax.mail.Message[] actual) throws IOException, javax.mail.MessagingException
assertEquals(ExpectedAttachment, Message)
.expected
- the expected attachment valuesactual
- the received email that must contain the attachment (the array
must have only one email)IOException
- when email can't be readjavax.mail.MessagingException
- when email values can't be accessedpublic static void assertEquals(ExpectedAttachment expected, javax.mail.Message actual) throws IOException, javax.mail.MessagingException
expected
- the expected attachment valuesactual
- the received email that must contain the attachmentIOException
- when email can't be readjavax.mail.MessagingException
- when email values can't be accessedpublic static void assertEquals(ExpectedAttachment expected, javax.mail.BodyPart attachment) throws javax.mail.MessagingException, org.junit.internal.ArrayComparisonFailure, IOException
expected
- the expected attachment valuesattachment
- the received attachmentIOException
- when email can't be readjavax.mail.MessagingException
- when email values can't be accessedorg.junit.internal.ArrayComparisonFailure
- when there are unexpected differencesCopyright © 2017. All rights reserved.