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 TypeMethodDescriptionvoidaddFrom(Address[] addresses) voidvoidaddRecipients(javax.mail.Message.RecipientType type, Address[] addresses) DataHandlerFlagsgetFlags()Address[]getFrom()String[]intgetMatchingHeaders(String[] strings) getNonMatchingHeaders(String[] strings) javax.mail.MessageAddress[]getRecipients(javax.mail.Message.RecipientType type) intgetSize()booleanisMimeType(String s) voidreply(boolean b) voidvoidsetContent(Object aContent, String aMimeType) voidsetContent(Multipart multipart) voidsetDataHandler(DataHandler handler) voidvoidvoidsetExpectedContent(Object aContent, String aMimeType) voidsetExpectedFrom(Address anAddress) voidsetExpectedRecipients(Address[] addresses) voidsetExpectedSentDate(Date aDate) voidsetExpectedSubject(String aSubject) voidsetExpectedText(String aText) voidvoidsetFlags(Flags flags, boolean b) voidsetFrom()voidsetFrom(Address anAddress) voidvoidsetRecipients(javax.mail.Message.RecipientType type, Address[] addresses) voidsetSentDate(Date aDate) voidsetSubject(String aSubject) voidvoidwriteTo(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:
getRecipientsin interfaceMessage- Throws:
MessagingException
-
setExpectedRecipients
public void setExpectedRecipients(Address[] addresses) -
setRecipients
public void setRecipients(javax.mail.Message.RecipientType type, Address[] addresses) throws MessagingException - Specified by:
setRecipientsin interfaceMessage- Throws:
MessagingException
-
addRecipients
public void addRecipients(javax.mail.Message.RecipientType type, Address[] addresses) throws MessagingException - Specified by:
addRecipientsin interfaceMessage- Throws:
MessagingException
-
getSubject
- Specified by:
getSubjectin interfaceMessage- Throws:
MessagingException
-
setSubject
- Specified by:
setSubjectin interfaceMessage- Throws:
MessagingException
-
setExpectedSubject
-
getSentDate
- Specified by:
getSentDatein interfaceMessage- Throws:
MessagingException
-
setExpectedSentDate
-
setSentDate
- Specified by:
setSentDatein interfaceMessage- Throws:
MessagingException
-
getReceivedDate
- Specified by:
getReceivedDatein 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:
saveChangesin interfaceMessage- Throws:
MessagingException
-
getSize
public int getSize() throws MessagingException -
getLineCount
public int getLineCount() throws MessagingException- Specified by:
getLineCountin interfaceMessage- Throws:
MessagingException
-
getContentType
- Specified by:
getContentTypein interfaceMessage- Throws:
MessagingException
-
isMimeType
- Specified by:
isMimeTypein interfaceMessage- Throws:
MessagingException
-
getDisposition
- Specified by:
getDispositionin interfaceMessage- Throws:
MessagingException
-
setDisposition
- Specified by:
setDispositionin interfaceMessage- Throws:
MessagingException
-
getDescription
- Specified by:
getDescriptionin interfaceMessage- Throws:
MessagingException
-
setDescription
- Specified by:
setDescriptionin interfaceMessage- Throws:
MessagingException
-
getFileName
- Specified by:
getFileNamein interfaceMessage- Throws:
MessagingException
-
setFileName
- Specified by:
setFileNamein interfaceMessage- Throws:
MessagingException
-
getInputStream
- Specified by:
getInputStreamin interfaceMessage- Throws:
IOExceptionMessagingException
-
getDataHandler
public DataHandler getDataHandler() throws MessagingException- Specified by:
getDataHandlerin interfaceMessage- Throws:
MessagingException
-
getContent
- Specified by:
getContentin interfaceMessage- Throws:
IOExceptionMessagingException
-
setDataHandler
public void setDataHandler(DataHandler handler) throws MessagingException - Specified by:
setDataHandlerin interfaceMessage- Throws:
MessagingException
-
setExpectedContent
-
setContent
- Specified by:
setContentin interfaceMessage- Throws:
MessagingException
-
setExpectedText
-
setText
-
setContent
public void setContent(Multipart multipart) throws MessagingException - Specified by:
setContentin interfaceMessage- Throws:
MessagingException
-
writeTo
- Specified by:
writeToin interfaceMessage- Throws:
IOExceptionMessagingException
-
getRealMessage
public javax.mail.Message getRealMessage()- Specified by:
getRealMessagein interfaceMessage
-
getHeader
-
setHeader
-
addHeader
-
removeHeader
- Specified by:
removeHeaderin interfaceMessage- Throws:
MessagingException
-
getAllHeaders
- Specified by:
getAllHeadersin interfaceMessage- Throws:
MessagingException
-
getMatchingHeaders
- Specified by:
getMatchingHeadersin interfaceMessage- Throws:
MessagingException
-
getNonMatchingHeaders
- Specified by:
getNonMatchingHeadersin interfaceMessage- Throws:
MessagingException
-