Package com.mockobjects.mail.internet
Class MockMimeMessage
java.lang.Object
com.mockobjects.MockObject
com.mockobjects.mail.MockMessage
com.mockobjects.mail.internet.MockMimeMessage
- All Implemented Interfaces:
MimeMessage
,Message
,Verifiable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addRecipient
(javax.mail.Message.RecipientType aType, Address anAddress) void
addRecipients
(javax.mail.Message.RecipientType type, String s) Address[]
getBody()
String[]
Folder
getMatchingHeaderLines
(String[] strings) int
getNonMatchingHeaderLines
(String[] strings) Address[]
boolean
boolean
isSet
(Flags.Flag flag) boolean
match
(SearchTerm term) void
void
void
setContentLanguage
(String[] strings) void
void
setDescription
(String s, String s1) void
setExpectedAddRecipient
(javax.mail.Message.RecipientType aType, Address anAddress) void
setFlag
(Flags.Flag flag, boolean b) void
setRecipient
(javax.mail.Message.RecipientType type, Address address) void
setRecipients
(javax.mail.Message.RecipientType type, String s) void
setReplyTo
(Address[] addresses) void
setSubject
(String s, String s1) void
void
writeTo
(OutputStream stream, String[] strings) Methods inherited from class com.mockobjects.mail.MockMessage
addFrom, addHeader, addRecipients, getAllHeaders, getContent, getContentType, getDataHandler, getDescription, getDisposition, getFileName, getFlags, getFrom, getHeader, getInputStream, getLineCount, getMatchingHeaders, getNonMatchingHeaders, getRealMessage, getReceivedDate, getRecipients, getSentDate, getSize, getSubject, isMimeType, removeHeader, reply, saveChanges, setContent, setContent, setDataHandler, setDescription, setDisposition, setExpectedContent, setExpectedFrom, setExpectedRecipients, setExpectedSentDate, setExpectedSubject, setExpectedText, setFileName, setFlags, setFrom, setFrom, setHeader, setRecipients, setSentDate, setSubject, setText, writeTo
Methods inherited from class com.mockobjects.MockObject
notImplemented, notYetImplemented, verify
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface alt.javax.mail.Message
addFrom, addHeader, addRecipients, getAllHeaders, getContent, getContentType, getDataHandler, getDescription, getDisposition, getFileName, getFlags, getFrom, getHeader, getInputStream, getLineCount, getMatchingHeaders, getNonMatchingHeaders, getRealMessage, getReceivedDate, getRecipients, getSentDate, getSize, getSubject, isMimeType, removeHeader, reply, saveChanges, setContent, setContent, setDataHandler, setDescription, setDisposition, setFileName, setFlags, setFrom, setFrom, setHeader, setRecipients, setSentDate, setSubject, setText, writeTo
-
Constructor Details
-
MockMimeMessage
public MockMimeMessage()
-
-
Method Details
-
setRecipient
public void setRecipient(javax.mail.Message.RecipientType type, Address address) throws MessagingException - Specified by:
setRecipient
in interfaceMimeMessage
- Throws:
MessagingException
-
setExpectedAddRecipient
public void setExpectedAddRecipient(javax.mail.Message.RecipientType aType, Address anAddress) -
addRecipient
public void addRecipient(javax.mail.Message.RecipientType aType, Address anAddress) throws MessagingException - Specified by:
addRecipient
in interfaceMimeMessage
- Throws:
MessagingException
-
setFlag
public void setFlag(Flags.Flag flag, boolean b) throws MessagingException - Specified by:
setFlag
in interfaceMimeMessage
- Throws:
MessagingException
-
getMessageNumber
public int getMessageNumber()- Specified by:
getMessageNumber
in interfaceMimeMessage
-
getBody
-
getFolder
public Folder getFolder()- Specified by:
getFolder
in interfaceMimeMessage
-
setBody
-
isExpunged
public boolean isExpunged()- Specified by:
isExpunged
in interfaceMimeMessage
-
match
public boolean match(SearchTerm term) throws MessagingException - Specified by:
match
in interfaceMimeMessage
- Throws:
MessagingException
-
getAllRecipients
public Address[] getAllRecipients() throws MessagingException- Specified by:
getAllRecipients
in interfaceMimeMessage
- Throws:
MessagingException
-
setRecipients
public void setRecipients(javax.mail.Message.RecipientType type, String s) throws MessagingException - Specified by:
setRecipients
in interfaceMimeMessage
- Throws:
MessagingException
-
addRecipients
public void addRecipients(javax.mail.Message.RecipientType type, String s) throws MessagingException - Specified by:
addRecipients
in interfaceMimeMessage
- Throws:
MessagingException
-
getReplyTo
public Address[] getReplyTo() throws MessagingException- Specified by:
getReplyTo
in interfaceMimeMessage
- Throws:
MessagingException
-
setReplyTo
public void setReplyTo(Address[] addresses) throws MessagingException - Specified by:
setReplyTo
in interfaceMimeMessage
- Throws:
MessagingException
-
setSubject
- Specified by:
setSubject
in interfaceMimeMessage
- Throws:
MessagingException
-
getEncoding
- Specified by:
getEncoding
in interfaceMimeMessage
- Throws:
MessagingException
-
getContentID
- Specified by:
getContentID
in interfaceMimeMessage
- Throws:
MessagingException
-
setContentID
- Specified by:
setContentID
in interfaceMimeMessage
- Throws:
MessagingException
-
getContentMD5
- Specified by:
getContentMD5
in interfaceMimeMessage
- Throws:
MessagingException
-
setContentMD5
- Specified by:
setContentMD5
in interfaceMimeMessage
- Throws:
MessagingException
-
setDescription
- Specified by:
setDescription
in interfaceMimeMessage
- Throws:
MessagingException
-
getContentLanguage
- Specified by:
getContentLanguage
in interfaceMimeMessage
- Throws:
MessagingException
-
setContentLanguage
- Specified by:
setContentLanguage
in interfaceMimeMessage
- Throws:
MessagingException
-
getMessageID
- Specified by:
getMessageID
in interfaceMimeMessage
- Throws:
MessagingException
-
getRawInputStream
- Specified by:
getRawInputStream
in interfaceMimeMessage
- Throws:
MessagingException
-
setText
- Specified by:
setText
in interfaceMimeMessage
- Throws:
MessagingException
-
writeTo
- Specified by:
writeTo
in interfaceMimeMessage
- Throws:
IOException
MessagingException
-
getHeader
- Specified by:
getHeader
in interfaceMimeMessage
- Throws:
MessagingException
-
addHeaderLine
- Specified by:
addHeaderLine
in interfaceMimeMessage
- Throws:
MessagingException
-
getAllHeaderLines
- Specified by:
getAllHeaderLines
in interfaceMimeMessage
- Throws:
MessagingException
-
getMatchingHeaderLines
- Specified by:
getMatchingHeaderLines
in interfaceMimeMessage
- Throws:
MessagingException
-
getNonMatchingHeaderLines
- Specified by:
getNonMatchingHeaderLines
in interfaceMimeMessage
- Throws:
MessagingException
-
isSet
public boolean isSet(Flags.Flag flag) throws MessagingException - Specified by:
isSet
in interfaceMimeMessage
- Throws:
MessagingException
-