OSDN Git Service

Resolved some SonarLint warnings
[spring-ext/ozacc-mail.git] / src / test / java / com / ozacc / mail / impl / SendMailProImplRealTest.java
old mode 100755 (executable)
new mode 100644 (file)
index 74a1768..3700856
@@ -1,86 +1,77 @@
-package com.ozacc.mail.impl;\r
-\r
-import junit.framework.TestCase;\r
-\r
-import org.apache.log4j.BasicConfigurator;\r
-\r
-import com.ozacc.mail.Mail;\r
-import com.ozacc.mail.MailBuilder;\r
-\r
-/**\r
- * SendMailProImplクラスのテストケース。実際に送信し、メーラーで受信して確認するテストです。\r
- * \r
- * @author Tomohiro Otsuka\r
- * @version $Id: SendMailProImplRealTest.java,v 1.1.2.1 2005/01/23 06:51:27 otsuka Exp $\r
- */\r
-public class SendMailProImplRealTest extends TestCase {\r
-\r
-       private MailBuilder builder;\r
-\r
-       private String email;\r
-\r
-       private String envelopeTo;\r
-\r
-       private SendMailProImpl sendMail;\r
-\r
-       /*\r
-        * @see TestCase#setUp()\r
-        */\r
-       protected void setUp() throws Exception {\r
-               super.setUp();\r
-\r
-               BasicConfigurator.configure();\r
-\r
-               email = "to@example.com";\r
-               envelopeTo = "to@example.com";\r
-\r
-               String host = "localhost";\r
-               sendMail = new SendMailProImpl(host);\r
-               sendMail.setMessageId("example.com");\r
-\r
-               builder = new XMLMailBuilderImpl();\r
-       }\r
-\r
-       /**\r
-        * @see junit.framework.TestCase#tearDown()\r
-        */\r
-       protected void tearDown() throws Exception {\r
-               BasicConfigurator.resetConfiguration();\r
-       }\r
-\r
-       /*      public void testSendMailWithAttachmentInputStream() throws Exception {\r
-        String classPath = "/com/ozacc/mail/test-mail4.xml";\r
-        Mail mail = builder.buildMail(classPath);\r
-        mail.addTo(email);\r
-\r
-        File image1 = new File("src/test/java/com/ozacc/mail/image1.jpg");\r
-        FileInputStream fis = new FileInputStream(image1);\r
-\r
-        mail.addFile(fis, "野菜画像.jpg");\r
-        mail.setSubject("添付ファイルのInputStream送信テスト");\r
-\r
-        sendMail.connect();\r
-        sendMail.send(mail);\r
-        sendMail.disconnect();\r
-        }\r
-\r
-        public void testSendMailEnvelopeTo() throws Exception {\r
-        String classPath = "/com/ozacc/mail/test-mail4.xml";\r
-        Mail mail = builder.buildMail(classPath);\r
-        mail.addTo(email);\r
-        mail.addEnvelopeTo(envelopeTo);\r
-\r
-        sendMail.connect();\r
-        sendMail.send(mail);\r
-        sendMail.disconnect();\r
-        }*/\r
-\r
-       /**\r
-        * テストケースがひとつもないとエラーになるので、ダミー。\r
-        */\r
-       public void testSendMailSuccess() {\r
-               Mail mail;\r
-               assertTrue(true);\r
-       }\r
-\r
+package com.ozacc.mail.impl;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.BasicConfigurator;
+
+import com.ozacc.mail.MailBuilder;
+
+/**
+ * SendMailProImplクラスのテストケース。実際に送信し、メーラーで受信して確認するテストです。
+ * 
+ * @author Tomohiro Otsuka
+ * @version $Id: SendMailProImplRealTest.java,v 1.1.2.1 2005/01/23 06:51:27 otsuka Exp $
+ */
+public class SendMailProImplRealTest extends TestCase {
+
+       private MailBuilder builder;
+
+       private SendMailProImpl sendMail;
+
+       /*
+        * @see TestCase#setUp()
+        */
+       protected void setUp() throws Exception {
+               super.setUp();
+
+               BasicConfigurator.configure();
+
+               String host = "localhost";
+               sendMail = new SendMailProImpl(host);
+               sendMail.setMessageId("example.com");
+
+               builder = new XMLMailBuilderImpl();
+       }
+
+       /**
+        * @see junit.framework.TestCase#tearDown()
+        */
+       protected void tearDown() throws Exception {
+               BasicConfigurator.resetConfiguration();
+       }
+
+       /*      public void testSendMailWithAttachmentInputStream() throws Exception {
+        String classPath = "/com/ozacc/mail/test-mail4.xml";
+        Mail mail = builder.buildMail(classPath);
+        mail.addTo(email);
+
+        File image1 = new File("src/test/java/com/ozacc/mail/image1.jpg");
+        FileInputStream fis = new FileInputStream(image1);
+
+        mail.addFile(fis, "野菜画像.jpg");
+        mail.setSubject("添付ファイルのInputStream送信テスト");
+
+        sendMail.connect();
+        sendMail.send(mail);
+        sendMail.disconnect();
+        }
+
+        public void testSendMailEnvelopeTo() throws Exception {
+        String classPath = "/com/ozacc/mail/test-mail4.xml";
+        Mail mail = builder.buildMail(classPath);
+        mail.addTo(email);
+        mail.addEnvelopeTo(envelopeTo);
+
+        sendMail.connect();
+        sendMail.send(mail);
+        sendMail.disconnect();
+        }*/
+
+       /**
+        * テストケースがひとつもないとエラーになるので、ダミー。
+        */
+       public void testSendMailSuccess() {
+               assertTrue(true);
+       }
+
 }
\ No newline at end of file