package org.apache.james.core; import javax.mail.MessagingException; import java.io.ByteArrayInputStream; import junit.framework.TestCase; /** * @author bago * * To change the template for this generated type comment go to * Window - Preferences - Java - Code Generation - Code and Comments */ public class MimeMessageWrapperTest extends TestCase { MimeMessageWrapper mw = null; public MimeMessageWrapperTest(String arg0) { super(arg0); MimeMessageInputStreamSource mmis = null; try { mmis = new MimeMessageInputStreamSource("test", new ByteArrayInputStream("To: \r\nSubject: this is a folded message subject with\r\n a long long long subject that should be unfolded\r\n\tto here.\r\nFrom: ciao\r\n".getBytes())); } catch (MessagingException e) { } mw = new MimeMessageWrapper(mmis); } /* * Class under test for String getSubject() */ public void testGetSubjectFolding() { try { assertEquals("this is a folded message subject with a long long long subject that should be unfolded to here.",mw.getSubject()); } catch (MessagingException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }