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

    public class MockMimeMessage
    extends MockMessage
    implements MimeMessage

### Constructor Summary

Constructors
Constructor and Description
`MockMimeMessage()`

### Method Summary

Methods
`void` `addHeaderLine(java.lang.String s)`
`void` `addRecipient(javax.mail.Message.RecipientType aType, Address anAddress)`
`void` `addRecipients(javax.mail.Message.RecipientType type, java.lang.String s)`
`java.util.Enumeration` `getAllHeaderLines()`
`Address[]` `getAllRecipients()`
`java.lang.String` `getBody()`
`java.lang.String` `getContentID()`
`java.lang.String[]` `getContentLanguage()`
`java.lang.String` `getContentMD5()`
`java.lang.String` `getEncoding()`
`Folder` `getFolder()`
`java.lang.String` `getHeader(java.lang.String s, java.lang.String s1)`
`java.util.Enumeration` `getMatchingHeaderLines(java.lang.String[] strings)`
`java.lang.String` `getMessageID()`
`int` `getMessageNumber()`
`java.util.Enumeration` `getNonMatchingHeaderLines(java.lang.String[] strings)`
`java.io.InputStream` `getRawInputStream()`
`Address[]` `getReplyTo()`
`boolean` `isExpunged()`
`boolean` `isSet(Flags.Flag flag)`
`boolean` `match(SearchTerm term)`
`void` `setBody(java.lang.String messageText)`
`void` `setContentID(java.lang.String s)`
`void` `setContentLanguage(java.lang.String[] strings)`
`void` `setContentMD5(java.lang.String s)`
`void` `setDescription(java.lang.String s, java.lang.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, java.lang.String s)`
`void` `setReplyTo(Address[] addresses)`
`void` `setSubject(java.lang.String s, java.lang.String s1)`
`void` `setText(java.lang.String s, java.lang.String s1)`
`void` `writeTo(java.io.OutputStream stream, java.lang.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 Detail

#### MockMimeMessage

    public MockMimeMessage()

### Method Detail

#### setRecipient

    public void setRecipient(javax.mail.Message.RecipientType type,
                    Address address)
                      throws MessagingException

Specified by:
  `setRecipient` in interface `MimeMessage`
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 interface `MimeMessage`
Throws:
  `MessagingException`

#### setFlag

    public void setFlag(Flags.Flag flag,
               boolean b)
                 throws MessagingException

Specified by:
  `setFlag` in interface `MimeMessage`
Throws:
  `MessagingException`

#### getMessageNumber

    public int getMessageNumber()

Specified by:
  `getMessageNumber` in interface `MimeMessage`

#### getBody

    public java.lang.String getBody()

#### getFolder

    public Folder getFolder()

Specified by:
  `getFolder` in interface `MimeMessage`

#### setBody

    public void setBody(java.lang.String messageText)

#### isExpunged

    public boolean isExpunged()

Specified by:
  `isExpunged` in interface `MimeMessage`

#### match

    public boolean match(SearchTerm term)
                  throws MessagingException

Specified by:
  `match` in interface `MimeMessage`
Throws:
  `MessagingException`

#### getAllRecipients

    public Address[] getAllRecipients()
                               throws MessagingException

Specified by:
  `getAllRecipients` in interface `MimeMessage`
Throws:
  `MessagingException`

#### setRecipients

    public void setRecipients(javax.mail.Message.RecipientType type,
                     java.lang.String s)
                       throws MessagingException

Specified by:
  `setRecipients` in interface `MimeMessage`
Throws:
  `MessagingException`

#### addRecipients

    public void addRecipients(javax.mail.Message.RecipientType type,
                     java.lang.String s)
                       throws MessagingException

Specified by:
  `addRecipients` in interface `MimeMessage`
Throws:
  `MessagingException`

#### getReplyTo

    public Address[] getReplyTo()
                         throws MessagingException

Specified by:
  `getReplyTo` in interface `MimeMessage`
Throws:
  `MessagingException`

#### setReplyTo

    public void setReplyTo(Address[] addresses)
                    throws MessagingException

Specified by:
  `setReplyTo` in interface `MimeMessage`
Throws:
  `MessagingException`

#### setSubject

    public void setSubject(java.lang.String s,
                  java.lang.String s1)
                    throws MessagingException

Specified by:
  `setSubject` in interface `MimeMessage`
Throws:
  `MessagingException`

#### getEncoding

    public java.lang.String getEncoding()
                                 throws MessagingException

Specified by:
  `getEncoding` in interface `MimeMessage`
Throws:
  `MessagingException`

#### getContentID

    public java.lang.String getContentID()
                                  throws MessagingException

Specified by:
  `getContentID` in interface `MimeMessage`
Throws:
  `MessagingException`

#### setContentID

    public void setContentID(java.lang.String s)
                      throws MessagingException

Specified by:
  `setContentID` in interface `MimeMessage`
Throws:
  `MessagingException`

#### getContentMD5

    public java.lang.String getContentMD5()
                                   throws MessagingException

Specified by:
  `getContentMD5` in interface `MimeMessage`
Throws:
  `MessagingException`

#### setContentMD5

    public void setContentMD5(java.lang.String s)
                       throws MessagingException

Specified by:
  `setContentMD5` in interface `MimeMessage`
Throws:
  `MessagingException`

#### setDescription

    public void setDescription(java.lang.String s,
                      java.lang.String s1)
                        throws MessagingException

Specified by:
  `setDescription` in interface `MimeMessage`
Throws:
  `MessagingException`

#### getContentLanguage

    public java.lang.String[] getContentLanguage()
                                          throws MessagingException

Specified by:
  `getContentLanguage` in interface `MimeMessage`
Throws:
  `MessagingException`

#### setContentLanguage

    public void setContentLanguage(java.lang.String[] strings)
                            throws MessagingException

Specified by:
  `setContentLanguage` in interface `MimeMessage`
Throws:
  `MessagingException`

#### getMessageID

    public java.lang.String getMessageID()
                                  throws MessagingException

Specified by:
  `getMessageID` in interface `MimeMessage`
Throws:
  `MessagingException`

#### getRawInputStream

    public java.io.InputStream getRawInputStream()
                                          throws MessagingException

Specified by:
  `getRawInputStream` in interface `MimeMessage`
Throws:
  `MessagingException`

#### setText

    public void setText(java.lang.String s,
               java.lang.String s1)
                 throws MessagingException

Specified by:
  `setText` in interface `MimeMessage`
Throws:
  `MessagingException`

#### writeTo

    public void writeTo(java.io.OutputStream stream,
               java.lang.String[] strings)
                 throws java.io.IOException,
                        MessagingException

Specified by:
  `writeTo` in interface `MimeMessage`
Throws:
  `java.io.IOException`
  `MessagingException`

#### getHeader

    public java.lang.String getHeader(java.lang.String s,
                             java.lang.String s1)
                               throws MessagingException

Specified by:
  `getHeader` in interface `MimeMessage`
Throws:
  `MessagingException`

#### addHeaderLine

    public void addHeaderLine(java.lang.String s)
                       throws MessagingException

Specified by:
  `addHeaderLine` in interface `MimeMessage`
Throws:
  `MessagingException`

#### getAllHeaderLines

    public java.util.Enumeration getAllHeaderLines()
                                            throws MessagingException

Specified by:
  `getAllHeaderLines` in interface `MimeMessage`
Throws:
  `MessagingException`

#### getMatchingHeaderLines

    public java.util.Enumeration getMatchingHeaderLines(java.lang.String[] strings)
                                                 throws MessagingException

Specified by:
  `getMatchingHeaderLines` in interface `MimeMessage`
Throws:
  `MessagingException`

#### getNonMatchingHeaderLines

    public java.util.Enumeration getNonMatchingHeaderLines(java.lang.String[] strings)
                                                    throws MessagingException

Specified by:
  `getNonMatchingHeaderLines` in interface `MimeMessage`
Throws:
  `MessagingException`

#### isSet

    public boolean isSet(Flags.Flag flag)
                  throws MessagingException

Specified by:
  `isSet` in interface `MimeMessage`
Throws:
  `MessagingException`