You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by sg...@apache.org on 2010/10/27 15:02:39 UTC

svn commit: r1027949 - /commons/proper/email/trunk/src/test/org/apache/commons/mail/EmailLiveTest.java

Author: sgoeschl
Date: Wed Oct 27 13:02:38 2010
New Revision: 1027949

URL: http://svn.apache.org/viewvc?rev=1027949&view=rev
Log:
Added sending a simple mail to the test suite as a sanity check.

Modified:
    commons/proper/email/trunk/src/test/org/apache/commons/mail/EmailLiveTest.java

Modified: commons/proper/email/trunk/src/test/org/apache/commons/mail/EmailLiveTest.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/test/org/apache/commons/mail/EmailLiveTest.java?rev=1027949&r1=1027948&r2=1027949&view=diff
==============================================================================
--- commons/proper/email/trunk/src/test/org/apache/commons/mail/EmailLiveTest.java (original)
+++ commons/proper/email/trunk/src/test/org/apache/commons/mail/EmailLiveTest.java Wed Oct 27 13:02:38 2010
@@ -106,7 +106,21 @@ public class EmailLiveTest extends BaseE
     // ======================================================================
     // Start of Tests
     // ======================================================================
-        
+
+    /**
+     * A sanity check that a simple email also works in reality.
+     *
+     * @throws Exception the test failed
+     */
+    public void testSimpleEmail() throws Exception
+    {
+        SimpleEmail email = (SimpleEmail) create(SimpleEmail.class);
+        email.setSubject("TestMail");
+        email.setMsg("This is a test mail ... :-)");
+
+        EmailUtils.writeMimeMessage( new File("./target/test-emails/simplemail.eml"), send(email).getMimeMessage());
+    }
+    
     /**
      * This test checks the various options of building a HTML email.
      *