Class MockMessage

    • 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
        Specified by:
        setDataHandler in interface Message
        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