commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r511706 - /jakarta/commons/proper/email/trunk/src/test/org/apache/commons/mail/SendWithAttachmentsTest.java
Date Mon, 26 Feb 2007 02:56:18 GMT
Author: dion
Date: Sun Feb 25 18:56:17 2007
New Revision: 511706

URL: http://svn.apache.org/viewvc?view=rev&rev=511706
Log:
Checkstyle - Remove tabs

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

Modified: jakarta/commons/proper/email/trunk/src/test/org/apache/commons/mail/SendWithAttachmentsTest.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/email/trunk/src/test/org/apache/commons/mail/SendWithAttachmentsTest.java?view=diff&rev=511706&r1=511705&r2=511706
==============================================================================
--- jakarta/commons/proper/email/trunk/src/test/org/apache/commons/mail/SendWithAttachmentsTest.java
(original)
+++ jakarta/commons/proper/email/trunk/src/test/org/apache/commons/mail/SendWithAttachmentsTest.java
Sun Feb 25 18:56:17 2007
@@ -109,85 +109,85 @@
             false);
     }
 
-	/**
-	 * @throws EmailException  
-	 * @throws IOException */
-	public void testSendWAttachments() throws EmailException, IOException
-	{
-		EmailAttachment attachment = new EmailAttachment();
-		File testFile = null;
-
-		/** File to used to test file attachmetns (Must be valid) */
-		testFile = File.createTempFile("commons-email-testfile", ".txt");
-
-		// ====================================================================
-		// Test Success
-		// ====================================================================
-		this.getMailServer();
-
-		String strSubject = "Test HTML Send #1 Subject (w charset)";
-
-		this.email = new MockHtmlEmailConcrete();
-		this.email.setHostName(this.strTestMailServer);
-		this.email.setSmtpPort(this.getMailServerPort());
-		this.email.setFrom(this.strTestMailFrom);
-		this.email.addTo(this.strTestMailTo);
-
-		/** File to used to test file attachmetns (Must be valid) */
-		attachment.setName("Test Attachment");
-		attachment.setDescription("Test Attachment Desc");
-		attachment.setPath(testFile.getAbsolutePath());
-		this.email.attach(attachment);
-
-		this.email.setAuthentication(this.strTestUser, this.strTestPasswd);
-
-		this.email.setCharset(Email.ISO_8859_1);
-		this.email.setSubject(strSubject);
-
-		URL url = new URL(EmailConfiguration.TEST_URL);
-		String cid = this.email.embed(url, "Apache Logo");
-
-		String strHtmlMsg =
-			"<html>The Apache logo - <img src=\"cid:" + cid + "\"><html>";
-
-		this.email.setHtmlMsg(strHtmlMsg);
-		this.email.setTextMsg(
-			"Your email client does not support HTML emails");
-
-		this.email.send();
-		this.fakeMailServer.stop();
-		// validate txt message
-		validateSend(
-			this.fakeMailServer,
-			strSubject,
-			this.email.getTextMsg(),
-			this.email.getFromAddress(),
-			this.email.getToList(),
-			this.email.getCcList(),
-			this.email.getBccList(),
-			true);
-
-		// validate html message
-		validateSend(
-			this.fakeMailServer,
-			strSubject,
-			this.email.getHtmlMsg(),
-			this.email.getFromAddress(),
-			this.email.getToList(),
-			this.email.getCcList(),
-			this.email.getBccList(),
-			false);
-
-		// validate attachment
-		validateSend(
-			this.fakeMailServer,
-			strSubject,
-			attachment.getName(),
-			this.email.getFromAddress(),
-			this.email.getToList(),
-			this.email.getCcList(),
-			this.email.getBccList(),
-			false);
+    /**
+     * @throws EmailException  
+     * @throws IOException */
+    public void testSendWAttachments() throws EmailException, IOException
+    {
+        EmailAttachment attachment = new EmailAttachment();
+        File testFile = null;
+
+        /** File to used to test file attachmetns (Must be valid) */
+        testFile = File.createTempFile("commons-email-testfile", ".txt");
+
+        // ====================================================================
+        // Test Success
+        // ====================================================================
+        this.getMailServer();
+
+        String strSubject = "Test HTML Send #1 Subject (w charset)";
+
+        this.email = new MockHtmlEmailConcrete();
+        this.email.setHostName(this.strTestMailServer);
+        this.email.setSmtpPort(this.getMailServerPort());
+        this.email.setFrom(this.strTestMailFrom);
+        this.email.addTo(this.strTestMailTo);
+
+        /** File to used to test file attachmetns (Must be valid) */
+        attachment.setName("Test Attachment");
+        attachment.setDescription("Test Attachment Desc");
+        attachment.setPath(testFile.getAbsolutePath());
+        this.email.attach(attachment);
+
+        this.email.setAuthentication(this.strTestUser, this.strTestPasswd);
+
+        this.email.setCharset(Email.ISO_8859_1);
+        this.email.setSubject(strSubject);
+
+        URL url = new URL(EmailConfiguration.TEST_URL);
+        String cid = this.email.embed(url, "Apache Logo");
+
+        String strHtmlMsg =
+            "<html>The Apache logo - <img src=\"cid:" + cid + "\"><html>";
+
+        this.email.setHtmlMsg(strHtmlMsg);
+        this.email.setTextMsg(
+            "Your email client does not support HTML emails");
+
+        this.email.send();
+        this.fakeMailServer.stop();
+        // validate txt message
+        validateSend(
+            this.fakeMailServer,
+            strSubject,
+            this.email.getTextMsg(),
+            this.email.getFromAddress(),
+            this.email.getToList(),
+            this.email.getCcList(),
+            this.email.getBccList(),
+            true);
+
+        // validate html message
+        validateSend(
+            this.fakeMailServer,
+            strSubject,
+            this.email.getHtmlMsg(),
+            this.email.getFromAddress(),
+            this.email.getToList(),
+            this.email.getCcList(),
+            this.email.getBccList(),
+            false);
+
+        // validate attachment
+        validateSend(
+            this.fakeMailServer,
+            strSubject,
+            attachment.getName(),
+            this.email.getFromAddress(),
+            this.email.getToList(),
+            this.email.getCcList(),
+            this.email.getBccList(),
+            false);
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message