commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgoes...@apache.org
Subject svn commit: r1031916 - /commons/proper/email/trunk/src/test/org/apache/commons/mail/EmailLiveTest.java
Date Sat, 06 Nov 2010 01:33:36 GMT
Author: sgoeschl
Date: Sat Nov  6 01:33:36 2010
New Revision: 1031916

URL: http://svn.apache.org/viewvc?rev=1031916&view=rev
Log:
Passed the wrong base location to URL resolver - we need the directory where the HTML file
is found.

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=1031916&r1=1031915&r2=1031916&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 Sat Nov
 6 01:33:36 2010
@@ -241,7 +241,7 @@ public class EmailLiveTest extends BaseE
     }
 
     /**
-     * Test sending a image HTML mail bases on a local HTML page.
+     * Test sending a image HTML mail bases on a local HTML page and local image.
      *
      * @throws Exception the test failed                               
      */
@@ -253,7 +253,7 @@ public class EmailLiveTest extends BaseE
         String htmlMsg1 = FileUtils.readFileToString(htmlFile);
 
         ImageHtmlEmail email = (ImageHtmlEmail) create(ImageHtmlEmail.class);
-        email.setDataSourceResolver(new DataSourceResolverImpl(htmlFile.toURI().toURL(),
true));
+        email.setDataSourceResolver(new DataSourceResolverImpl(htmlFile.getParentFile().toURI().toURL(),
false));
         email.setSubject("[testImageHtmlEmail] 1.Test: simple html content");
         email.setHtmlMsg(htmlMsg1);
 
@@ -277,7 +277,7 @@ public class EmailLiveTest extends BaseE
             String htmlMsg = getFromUrl(url);
 
             ImageHtmlEmail email = (ImageHtmlEmail) create(ImageHtmlEmail.class);
-            email.setDataSourceResolver(new DataSourceResolverImpl(url, true));
+            email.setDataSourceResolver(new DataSourceResolverImpl(url, false));
             email.setSubject("[testImageHtmlEmail] 2.Test: complex html content");
             email.setHtmlMsg(htmlMsg);
 



Mime
View raw message