org.apache.james.core
Class MimeMessageCopyOnWriteProxyTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.james.core.MimeMessageTest
              extended by org.apache.james.core.MimeMessageFromStreamTest
                  extended by org.apache.james.core.MimeMessageCopyOnWriteProxyTest
All Implemented Interfaces:
junit.framework.Test

public class MimeMessageCopyOnWriteProxyTest
extends MimeMessageFromStreamTest


Constructor Summary
MimeMessageCopyOnWriteProxyTest()
           
 
Method Summary
protected  javax.mail.internet.MimeMessage getMessageFromSources(java.lang.String sources)
           
 void testMessageAvoidCloning()
          If I create a new MimeMessageCopyOnWriteProxy from another MimeMessageCopyOnWriteProxy, I remove references to the first and I change the second, then it should not clone
 void testMessageCloning1()
           
 void testMessageCloning2()
           
 void testMessageCloning3()
          If I create a new MimeMessageCopyOnWriteProxy from a MimeMessage and I change the new message, the original should be unaltered and the proxy should clone the message.
 void testMessageCloningViaCoW3()
          This test throw a NullPointerException when the original message was created by a MimeMessageInputStreamSource.
 void testMessageDisposing()
           
 void testNPE1()
           
 
Methods inherited from class org.apache.james.core.MimeMessageFromStreamTest
getMessageWithBadReturnPath, getMissingEncodingAddHeaderMessage, getMissingEncodingMessage, getMultipartMessage, getSimpleMessage
 
Methods inherited from class org.apache.james.core.MimeMessageTest
debugMessage, getCleanedMessageSource, getMessageWithBadReturnPathSource, getMissingEncodingAddHeaderExpected, getMissingEncodingAddHeaderSource, getMissingEncodingMessageSource, getMultipartMessageExpected1, getMultipartMessageExpected2, getMultipartMessageExpected3, getMultipartMessageSource, getSimpleMessageCleanedSource, getSimpleMessageCleanedSourceHeaderExpected, testGetLineCount, testHeaderOrder, testMessageCloningViaCoW, testMessageCloningViaCoW2, testMessageCloningViaCoWSubjectLost, testMultipartMessageChanges, testReturnPath, testSimpleMessage
 
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
 

Constructor Detail

MimeMessageCopyOnWriteProxyTest

public MimeMessageCopyOnWriteProxyTest()
Method Detail

getMessageFromSources

protected javax.mail.internet.MimeMessage getMessageFromSources(java.lang.String sources)
                                                         throws java.lang.Exception
Overrides:
getMessageFromSources in class MimeMessageFromStreamTest
Throws:
java.lang.Exception

testMessageCloning1

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

testMessageCloning2

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

testMessageAvoidCloning

public void testMessageAvoidCloning()
                             throws java.lang.Exception
If I create a new MimeMessageCopyOnWriteProxy from another MimeMessageCopyOnWriteProxy, I remove references to the first and I change the second, then it should not clone

Throws:
java.lang.Exception

testMessageCloning3

public void testMessageCloning3()
                         throws java.lang.Exception
If I create a new MimeMessageCopyOnWriteProxy from a MimeMessage and I change the new message, the original should be unaltered and the proxy should clone the message.

Throws:
java.lang.Exception

testMessageDisposing

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

testNPE1

public void testNPE1()
              throws javax.mail.MessagingException,
                     java.lang.InterruptedException
Throws:
javax.mail.MessagingException
java.lang.InterruptedException

testMessageCloningViaCoW3

public void testMessageCloningViaCoW3()
                               throws java.lang.Exception
This test throw a NullPointerException when the original message was created by a MimeMessageInputStreamSource.

Throws:
java.lang.Exception


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