1 36 package org.columba.ristretto.message; 37 38 import junit.framework.TestCase; 39 40 public class HeaderTest extends TestCase { 41 42 46 public HeaderTest(String arg0) { 47 super(arg0); 48 } 49 50 public void testToString() { 51 Header testHeader = new Header(); 52 testHeader.set("From","Timo Stich <tstich@users.sourceforge.net"); 53 testHeader.set("To","Frederik Dietz <fdietz@users.sourceforge.net>, Columba Developer Mailinglist <columba-devel@lists.sourceforge.net>"); 54 testHeader.set("Subject","This is a test message"); 55 56 String headerString = testHeader.toString(); 57 assertTrue(headerString.equals("Subject: This is a test message\r\nTo: Frederik Dietz <fdietz@users.sourceforge.net>, Columba Developer Mailinglist\r\n <columba-devel@lists.sourceforge.net>\r\nFrom: Timo Stich <tstich@users.sourceforge.net\r\n\r\n")); 58 } 59 60 } 61 | Popular Tags |