⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testsendmail.java

📁 找回密码的程序
💻 JAVA
字号:
package test;

import junit.framework.*;
import password.*;

/**这是SendMail的JUNIT测试类.
 * <p>Title: 项目实战 Stage2</p>
 *
 * <p>Description: ACCP 4.0</p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: jb-aptech.com.cn</p>
 *
 * @author Dong Ping
 * @version 1.0
 */
public class TestSendMail extends TestCase {
    private SendMail sendMail = null;

    protected void setUp() throws Exception {
        super.setUp();
        /**@todo verify the constructors*/
        sendMail = new SendMail();
    }

    protected void tearDown() throws Exception {
        sendMail = null;
        super.tearDown();
    }

    public void testSendnow() throws Exception {
        sendMail.setMsgText("Hello this is test");
        sendMail.setFrom("ping.dong@jb-aptech.com.cn");
        sendMail.setTo("ping.dong@jb-aptech.com.cn");
        sendMail.setSmtpHost("mailsvr.jv.jb-aptech.com.cn");
        sendMail.setSubject("test mail");
        sendMail.sendnow();
        /**@todo fill in the test code*/
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -