Package com.mockobjects.mail
Class MockMessage
java.lang.Object
com.mockobjects.MockObject
com.mockobjects.mail.MockMessage
- All Implemented Interfaces:
Message
,Verifiable
- Direct Known Subclasses:
MockMimeMessage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFrom
(Address[] addresses) void
void
addRecipients
(javax.mail.Message.RecipientType type, Address[] addresses) DataHandler
Flags
getFlags()
Address[]
getFrom()
String[]
int
getMatchingHeaders
(String[] strings) getNonMatchingHeaders
(String[] strings) javax.mail.Message
Address[]
getRecipients
(javax.mail.Message.RecipientType type) int
getSize()
boolean
isMimeType
(String s) void
reply
(boolean b) void
void
setContent
(Object aContent, String aMimeType) void
setContent
(Multipart multipart) void
setDataHandler
(DataHandler handler) void
void
void
setExpectedContent
(Object aContent, String aMimeType) void
setExpectedFrom
(Address anAddress) void
setExpectedRecipients
(Address[] addresses) void
setExpectedSentDate
(Date aDate) void
setExpectedSubject
(String aSubject) void
setExpectedText
(String aText) void
void
setFlags
(Flags flags, boolean b) void
setFrom()
void
setFrom
(Address anAddress) void
void
setRecipients
(javax.mail.Message.RecipientType type, Address[] addresses) void
setSentDate
(Date aDate) void
setSubject
(String aSubject) void
void
writeTo
(OutputStream stream) Methods inherited from class com.mockobjects.MockObject
notImplemented, notYetImplemented, verify
-
Constructor Details
-
MockMessage
public MockMessage()
-
-
Method Details
-
getFrom
public Address[] getFrom() throws MessagingException -
setFrom
public void setFrom() throws MessagingException -
setExpectedFrom
public void setExpectedFrom(Address anAddress) -
setFrom
public void setFrom(Address anAddress) throws MessagingException -
addFrom
public void addFrom(Address[] addresses) throws MessagingException -
getRecipients
public Address[] getRecipients(javax.mail.Message.RecipientType type) throws MessagingException - Specified by:
getRecipients
in interfaceMessage
- Throws:
MessagingException
-
setExpectedRecipients
public void setExpectedRecipients(Address[] addresses) -
setRecipients
public void setRecipients(javax.mail.Message.RecipientType type, Address[] addresses) throws MessagingException - Specified by:
setRecipients
in interfaceMessage
- Throws:
MessagingException
-
addRecipients
public void addRecipients(javax.mail.Message.RecipientType type, Address[] addresses) throws MessagingException - Specified by:
addRecipients
in interfaceMessage
- Throws:
MessagingException
-
getSubject
- Specified by:
getSubject
in interfaceMessage
- Throws:
MessagingException
-
setSubject
- Specified by:
setSubject
in interfaceMessage
- Throws:
MessagingException
-
setExpectedSubject
-
getSentDate
- Specified by:
getSentDate
in interfaceMessage
- Throws:
MessagingException
-
setExpectedSentDate
-
setSentDate
- Specified by:
setSentDate
in interfaceMessage
- Throws:
MessagingException
-
getReceivedDate
- Specified by:
getReceivedDate
in interfaceMessage
- Throws:
MessagingException
-
getFlags
public Flags getFlags() throws MessagingException -
setFlags
public void setFlags(Flags flags, boolean b) throws MessagingException -
reply
-
saveChanges
public void saveChanges() throws MessagingException- Specified by:
saveChanges
in interfaceMessage
- Throws:
MessagingException
-
getSize
public int getSize() throws MessagingException -
getLineCount
public int getLineCount() throws MessagingException- Specified by:
getLineCount
in interfaceMessage
- Throws:
MessagingException
-
getContentType
- Specified by:
getContentType
in interfaceMessage
- Throws:
MessagingException
-
isMimeType
- Specified by:
isMimeType
in interfaceMessage
- Throws:
MessagingException
-
getDisposition
- Specified by:
getDisposition
in interfaceMessage
- Throws:
MessagingException
-
setDisposition
- Specified by:
setDisposition
in interfaceMessage
- Throws:
MessagingException
-
getDescription
- Specified by:
getDescription
in interfaceMessage
- Throws:
MessagingException
-
setDescription
- Specified by:
setDescription
in interfaceMessage
- Throws:
MessagingException
-
getFileName
- Specified by:
getFileName
in interfaceMessage
- Throws:
MessagingException
-
setFileName
- Specified by:
setFileName
in interfaceMessage
- Throws:
MessagingException
-
getInputStream
- Specified by:
getInputStream
in interfaceMessage
- Throws:
IOException
MessagingException
-
getDataHandler
public DataHandler getDataHandler() throws MessagingException- Specified by:
getDataHandler
in interfaceMessage
- Throws:
MessagingException
-
getContent
- Specified by:
getContent
in interfaceMessage
- Throws:
IOException
MessagingException
-
setDataHandler
public void setDataHandler(DataHandler handler) throws MessagingException - Specified by:
setDataHandler
in interfaceMessage
- Throws:
MessagingException
-
setExpectedContent
-
setContent
- Specified by:
setContent
in interfaceMessage
- Throws:
MessagingException
-
setExpectedText
-
setText
-
setContent
public void setContent(Multipart multipart) throws MessagingException - Specified by:
setContent
in interfaceMessage
- Throws:
MessagingException
-
writeTo
- Specified by:
writeTo
in interfaceMessage
- Throws:
IOException
MessagingException
-
getRealMessage
public javax.mail.Message getRealMessage()- Specified by:
getRealMessage
in interfaceMessage
-
getHeader
-
setHeader
-
addHeader
-
removeHeader
- Specified by:
removeHeader
in interfaceMessage
- Throws:
MessagingException
-
getAllHeaders
- Specified by:
getAllHeaders
in interfaceMessage
- Throws:
MessagingException
-
getMatchingHeaders
- Specified by:
getMatchingHeaders
in interfaceMessage
- Throws:
MessagingException
-
getNonMatchingHeaders
- Specified by:
getNonMatchingHeaders
in interfaceMessage
- Throws:
MessagingException
-