org.apache.james.transport.matchers
Class AbstractHasMailAttributeTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.james.transport.matchers.AbstractHasMailAttributeTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
HasMailAttributeTest, HasMailAttributeWithValueTest, SMTPAuthSuccessfulTest, SMTPAuthUserIsTest

public abstract class AbstractHasMailAttributeTest
extends junit.framework.TestCase


Field Summary
protected  java.lang.String MAIL_ATTRIBUTE_NAME
           
protected  java.lang.String MAIL_ATTRIBUTE_VALUE
           
protected  java.lang.String mailAttributeName
           
protected  java.lang.String mailAttributeValue
           
protected  Matcher matcher
           
protected  FakeMail mockedMail
           
protected  javax.mail.internet.MimeMessage mockedMimeMessage
           
 
Constructor Summary
AbstractHasMailAttributeTest()
           
 
Method Summary
protected abstract  GenericMatcher createMatcher()
           
protected abstract  java.lang.String getConfigOption()
           
protected abstract  java.lang.String getHasMailAttribute()
           
protected  void init()
           
protected  void setMailAttributeName(java.lang.String mailAttributeName)
           
protected  void setMailAttributeValue(java.lang.String mailAttributeValue)
           
protected  void setupAll()
           
protected  void setupMatcher()
           
protected  void setupMockedMail(javax.mail.internet.MimeMessage m)
           
 void testAttributeIsMatched()
           
 void testAttributeIsNotMatched()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mockedMimeMessage

protected javax.mail.internet.MimeMessage mockedMimeMessage

mockedMail

protected FakeMail mockedMail

matcher

protected Matcher matcher

MAIL_ATTRIBUTE_NAME

protected final java.lang.String MAIL_ATTRIBUTE_NAME
See Also:
Constant Field Values

MAIL_ATTRIBUTE_VALUE

protected final java.lang.String MAIL_ATTRIBUTE_VALUE
See Also:
Constant Field Values

mailAttributeName

protected java.lang.String mailAttributeName

mailAttributeValue

protected java.lang.String mailAttributeValue
Constructor Detail

AbstractHasMailAttributeTest

public AbstractHasMailAttributeTest()
Method Detail

setMailAttributeName

protected void setMailAttributeName(java.lang.String mailAttributeName)

setMailAttributeValue

protected void setMailAttributeValue(java.lang.String mailAttributeValue)

setupMockedMail

protected void setupMockedMail(javax.mail.internet.MimeMessage m)
                        throws javax.mail.internet.ParseException
Throws:
javax.mail.internet.ParseException

setupMatcher

protected void setupMatcher()
                     throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException

testAttributeIsMatched

public void testAttributeIsMatched()
                            throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException

init

protected void init()

setupAll

protected void setupAll()
                 throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException

testAttributeIsNotMatched

public void testAttributeIsNotMatched()
                               throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException

getHasMailAttribute

protected abstract java.lang.String getHasMailAttribute()

createMatcher

protected abstract GenericMatcher createMatcher()

getConfigOption

protected abstract java.lang.String getConfigOption()


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.