com.mockobjects.mail
Class MockMessage

java.lang.Object
  extended bycom.mockobjects.MockObject
      extended bycom.mockobjects.mail.MockMessage
All Implemented Interfaces:
Message, Verifiable
Direct Known Subclasses:
MockMimeMessage

public class MockMessage
extends MockObject
implements Message


Constructor Summary
MockMessage()
           
 
Method Summary
 void addFrom(Address[] addresses)
           
 void addHeader(java.lang.String s, java.lang.String s1)
           
 void addRecipients(javax.mail.Message.RecipientType type, Address[] addresses)
           
 java.util.Enumeration getAllHeaders()
           
 java.lang.Object getContent()
           
 java.lang.String getContentType()
           
 DataHandler getDataHandler()
           
 java.lang.String getDescription()
           
 java.lang.String getDisposition()
           
 java.lang.String getFileName()
           
 Flags getFlags()
           
 Address[] getFrom()
           
 java.lang.String[] getHeader(java.lang.String s)
           
 java.io.InputStream getInputStream()
           
 int getLineCount()
           
 java.util.Enumeration getMatchingHeaders(java.lang.String[] strings)
           
 java.util.Enumeration getNonMatchingHeaders(java.lang.String[] strings)
           
 javax.mail.Message getRealMessage()
           
 java.util.Date getReceivedDate()
           
 Address[] getRecipients(javax.mail.Message.RecipientType type)
           
 java.util.Date getSentDate()
           
 int getSize()
           
 java.lang.String getSubject()
           
 boolean isMimeType(java.lang.String s)
           
 void removeHeader(java.lang.String s)
           
 Message reply(boolean b)
           
 void saveChanges()
           
 void setContent(Multipart multipart)
           
 void setContent(java.lang.Object aContent, java.lang.String aMimeType)
           
 void setDataHandler(DataHandler handler)
           
 void setDescription(java.lang.String s)
           
 void setDisposition(java.lang.String s)
           
 void setExpectedContent(java.lang.Object aContent, java.lang.String aMimeType)
           
 void setExpectedFrom(Address anAddress)
           
 void setExpectedRecipients(Address[] addresses)
           
 void setExpectedSentDate(java.util.Date aDate)
           
 void setExpectedSubject(java.lang.String aSubject)
           
 void setExpectedText(java.lang.String aText)
           
 void setFileName(java.lang.String s)
           
 void setFlags(Flags flags, boolean b)
           
 void setFrom()
           
 void setFrom(Address anAddress)
           
 void setHeader(java.lang.String s, java.lang.String s1)
           
 void setRecipients(javax.mail.Message.RecipientType type, Address[] addresses)
           
 void setSentDate(java.util.Date aDate)
           
 void setSubject(java.lang.String aSubject)
           
 void setText(java.lang.String aText)
           
 void writeTo(java.io.OutputStream stream)
           
 
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
setDataHandler
 

Constructor Detail

MockMessage

public MockMessage()
Method Detail

getFrom

public Address[] getFrom()
                  throws MessagingException
Specified by:
getFrom in interface Message
Throws:
MessagingException

setFrom

public void setFrom()
             throws MessagingException
Specified by:
setFrom in interface Message
Throws:
MessagingException

setExpectedFrom

public void setExpectedFrom(Address anAddress)

setFrom

public void setFrom(Address anAddress)
             throws MessagingException
Specified by:
setFrom in interface Message
Throws:
MessagingException

addFrom

public void addFrom(Address[] addresses)
             throws MessagingException
Specified by:
addFrom in interface Message
Throws:
MessagingException

getRecipients

public Address[] getRecipients(javax.mail.Message.RecipientType type)
                        throws MessagingException
Specified by:
getRecipients in interface Message
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 interface Message
Throws:
MessagingException

addRecipients

public void addRecipients(javax.mail.Message.RecipientType type,
                          Address[] addresses)
                   throws MessagingException
Specified by:
addRecipients in interface Message
Throws:
MessagingException

getSubject

public java.lang.String getSubject()
                            throws MessagingException
Specified by:
getSubject in interface Message
Throws:
MessagingException

setSubject

public void setSubject(java.lang.String aSubject)
                throws MessagingException
Specified by:
setSubject in interface Message
Throws:
MessagingException

setExpectedSubject

public void setExpectedSubject(java.lang.String aSubject)

getSentDate

public java.util.Date getSentDate()
                           throws MessagingException
Specified by:
getSentDate in interface Message
Throws:
MessagingException

setExpectedSentDate

public void setExpectedSentDate(java.util.Date aDate)

setSentDate

public void setSentDate(java.util.Date aDate)
                 throws MessagingException
Specified by:
setSentDate in interface Message
Throws:
MessagingException

getReceivedDate

public java.util.Date getReceivedDate()
                               throws MessagingException
Specified by:
getReceivedDate in interface Message
Throws:
MessagingException

getFlags

public Flags getFlags()
               throws MessagingException
Specified by:
getFlags in interface Message
Throws:
MessagingException

setFlags

public void setFlags(Flags flags,
                     boolean b)
              throws MessagingException
Specified by:
setFlags in interface Message
Throws:
MessagingException

reply

public Message reply(boolean b)
              throws MessagingException
Specified by:
reply in interface Message
Throws:
MessagingException

saveChanges

public void saveChanges()
                 throws MessagingException
Specified by:
saveChanges in interface Message
Throws:
MessagingException

getSize

public int getSize()
            throws MessagingException
Specified by:
getSize in interface Message
Throws:
MessagingException

getLineCount

public int getLineCount()
                 throws MessagingException
Specified by:
getLineCount in interface Message
Throws:
MessagingException

getContentType

public java.lang.String getContentType()
                                throws MessagingException
Specified by:
getContentType in interface Message
Throws:
MessagingException

isMimeType

public boolean isMimeType(java.lang.String s)
                   throws MessagingException
Specified by:
isMimeType in interface Message
Throws:
MessagingException

getDisposition

public java.lang.String getDisposition()
                                throws MessagingException
Specified by:
getDisposition in interface Message
Throws:
MessagingException

setDisposition

public void setDisposition(java.lang.String s)
                    throws MessagingException
Specified by:
setDisposition in interface Message
Throws:
MessagingException

getDescription

public java.lang.String getDescription()
                                throws MessagingException
Specified by:
getDescription in interface Message
Throws:
MessagingException

setDescription

public void setDescription(java.lang.String s)
                    throws MessagingException
Specified by:
setDescription in interface Message
Throws:
MessagingException

getFileName

public java.lang.String getFileName()
                             throws MessagingException
Specified by:
getFileName in interface Message
Throws:
MessagingException

setFileName

public void setFileName(java.lang.String s)
                 throws MessagingException
Specified by:
setFileName in interface Message
Throws:
MessagingException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException,
                                          MessagingException
Specified by:
getInputStream in interface Message
Throws:
java.io.IOException
MessagingException

getDataHandler

public DataHandler getDataHandler()
                           throws MessagingException
Specified by:
getDataHandler in interface Message
Throws:
MessagingException

getContent

public java.lang.Object getContent()
                            throws java.io.IOException,
                                   MessagingException
Specified by:
getContent in interface Message
Throws:
java.io.IOException
MessagingException

setDataHandler

public void setDataHandler(DataHandler handler)
                    throws MessagingException
Throws:
MessagingException

setExpectedContent

public void setExpectedContent(java.lang.Object aContent,
                               java.lang.String aMimeType)

setContent

public void setContent(java.lang.Object aContent,
                       java.lang.String aMimeType)
                throws MessagingException
Specified by:
setContent in interface Message
Throws:
MessagingException

setExpectedText

public void setExpectedText(java.lang.String aText)

setText

public void setText(java.lang.String aText)
             throws MessagingException
Specified by:
setText in interface Message
Throws:
MessagingException

setContent

public void setContent(Multipart multipart)
                throws MessagingException
Specified by:
setContent in interface Message
Throws:
MessagingException

writeTo

public void writeTo(java.io.OutputStream stream)
             throws java.io.IOException,
                    MessagingException
Specified by:
writeTo in interface Message
Throws:
java.io.IOException
MessagingException

getRealMessage

public javax.mail.Message getRealMessage()
Specified by:
getRealMessage in interface Message

getHeader

public java.lang.String[] getHeader(java.lang.String s)
                             throws MessagingException
Specified by:
getHeader in interface Message
Throws:
MessagingException

setHeader

public void setHeader(java.lang.String s,
                      java.lang.String s1)
               throws MessagingException
Specified by:
setHeader in interface Message
Throws:
MessagingException

addHeader

public void addHeader(java.lang.String s,
                      java.lang.String s1)
               throws MessagingException
Specified by:
addHeader in interface Message
Throws:
MessagingException

removeHeader

public void removeHeader(java.lang.String s)
                  throws MessagingException
Specified by:
removeHeader in interface Message
Throws:
MessagingException

getAllHeaders

public java.util.Enumeration getAllHeaders()
                                    throws MessagingException
Specified by:
getAllHeaders in interface Message
Throws:
MessagingException

getMatchingHeaders

public java.util.Enumeration getMatchingHeaders(java.lang.String[] strings)
                                         throws MessagingException
Specified by:
getMatchingHeaders in interface Message
Throws:
MessagingException

getNonMatchingHeaders

public java.util.Enumeration getNonMatchingHeaders(java.lang.String[] strings)
                                            throws MessagingException
Specified by:
getNonMatchingHeaders in interface Message
Throws:
MessagingException


Copyright © 2002 Mock Objects. All Rights Reserved.