org.apache.james.smtpserver
Class SMTPServerTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.james.smtpserver.SMTPServerTest
All Implemented Interfaces:
junit.framework.Test

public class SMTPServerTest
extends junit.framework.TestCase

Tests the org.apache.james.smtpserver.SMTPServer unit


Constructor Summary
SMTPServerTest()
           
 
Method Summary
protected  void setUp()
           
 void test8bitmimeFromStream()
          This is useful code to run tests on javamail bugs http://issues.apache.org/jira/browse/JAMES-52 This
 void testAuth()
           
 void testAuthWithEmptySender()
           
 void testConnectionLimitExceeded()
           
 void testDeliveryToSelfWithGatewayAndBind()
          This has been created to test javamail 1.4 introduced bug.
 void testEhloResolv()
           
 void testEhloResolvDefault()
           
 void testEhloResolvIgnoreClientDisabled()
           
 void testEmptyMessage()
           
 void testHandleAnnouncedMessageSizeLimitExceeded()
           
 void testHandleMessageSizeLimitExceeded()
           
 void testHandleMessageSizeLimitRespected()
           
 void testHeloEnforcement()
           
 void testHeloEnforcementDisabled()
           
 void testHeloResolv()
           
 void testHeloResolvDefault()
           
 void testMaxRcpt()
           
 void testMaxRcptDefault()
           
 void testMultipleMailsAndRset()
           
 void testNoRecepientSpecified()
           
 void testRelayingDenied()
           
 void testSenderDomainResolv()
           
 void testSenderDomainResolvDefault()
           
 void testSenderDomainResolvRelayClient()
           
 void testSenderDomainResolvRelayClientDefault()
           
 void testSimpleMailSendWithEHLO()
           
 void testSimpleMailSendWithHELO()
           
 void testTwoMailsInSequence()
           
 void testTwoSimultaneousMails()
           
 void verifyLastMail(java.lang.String sender, java.lang.String recipient, javax.mail.internet.MimeMessage msg)
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 

Constructor Detail

SMTPServerTest

public SMTPServerTest()
Method Detail

verifyLastMail

public void verifyLastMail(java.lang.String sender,
                           java.lang.String recipient,
                           javax.mail.internet.MimeMessage msg)
                    throws java.io.IOException,
                           javax.mail.MessagingException
Throws:
java.io.IOException
javax.mail.MessagingException

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

testSimpleMailSendWithEHLO

public void testSimpleMailSendWithEHLO()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testEmptyMessage

public void testEmptyMessage()
                      throws java.lang.Exception
Throws:
java.lang.Exception

testSimpleMailSendWithHELO

public void testSimpleMailSendWithHELO()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testTwoSimultaneousMails

public void testTwoSimultaneousMails()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testTwoMailsInSequence

public void testTwoMailsInSequence()
                            throws java.lang.Exception
Throws:
java.lang.Exception

testHeloResolv

public void testHeloResolv()
                    throws java.lang.Exception
Throws:
java.lang.Exception

testHeloResolvDefault

public void testHeloResolvDefault()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testSenderDomainResolv

public void testSenderDomainResolv()
                            throws java.lang.Exception
Throws:
java.lang.Exception

testSenderDomainResolvDefault

public void testSenderDomainResolvDefault()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

testSenderDomainResolvRelayClientDefault

public void testSenderDomainResolvRelayClientDefault()
                                              throws java.lang.Exception
Throws:
java.lang.Exception

testSenderDomainResolvRelayClient

public void testSenderDomainResolvRelayClient()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

testMaxRcpt

public void testMaxRcpt()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testMaxRcptDefault

public void testMaxRcptDefault()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testEhloResolv

public void testEhloResolv()
                    throws java.lang.Exception
Throws:
java.lang.Exception

testEhloResolvDefault

public void testEhloResolvDefault()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testEhloResolvIgnoreClientDisabled

public void testEhloResolvIgnoreClientDisabled()
                                        throws java.lang.Exception
Throws:
java.lang.Exception

testHeloEnforcement

public void testHeloEnforcement()
                         throws java.lang.Exception
Throws:
java.lang.Exception

testHeloEnforcementDisabled

public void testHeloEnforcementDisabled()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testAuth

public void testAuth()
              throws java.lang.Exception
Throws:
java.lang.Exception

testAuthWithEmptySender

public void testAuthWithEmptySender()
                             throws java.lang.Exception
Throws:
java.lang.Exception

testNoRecepientSpecified

public void testNoRecepientSpecified()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testMultipleMailsAndRset

public void testMultipleMailsAndRset()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testRelayingDenied

public void testRelayingDenied()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testHandleAnnouncedMessageSizeLimitExceeded

public void testHandleAnnouncedMessageSizeLimitExceeded()
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

testHandleMessageSizeLimitExceeded

public void testHandleMessageSizeLimitExceeded()
                                        throws java.lang.Exception
Throws:
java.lang.Exception

testHandleMessageSizeLimitRespected

public void testHandleMessageSizeLimitRespected()
                                         throws java.lang.Exception
Throws:
java.lang.Exception

testConnectionLimitExceeded

public void testConnectionLimitExceeded()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testDeliveryToSelfWithGatewayAndBind

public void testDeliveryToSelfWithGatewayAndBind()
                                          throws java.lang.Exception
This has been created to test javamail 1.4 introduced bug. http://issues.apache.org/jira/browse/JAMES-490

Throws:
java.lang.Exception

test8bitmimeFromStream

public void test8bitmimeFromStream()
                            throws java.lang.Exception
This is useful code to run tests on javamail bugs http://issues.apache.org/jira/browse/JAMES-52 This

Throws:
java.lang.Exception


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.