Coverage report

  %line %branch
com.ozacc.mail.mock.MockSendMail
64% 
94% 

 1  
 package com.ozacc.mail.mock;
 2  
 
 3  
 import java.io.UnsupportedEncodingException;
 4  
 import java.util.ArrayList;
 5  
 import java.util.List;
 6  
 import java.util.Properties;
 7  
 
 8  
 import javax.mail.MessagingException;
 9  
 import javax.mail.Session;
 10  
 import javax.mail.internet.InternetAddress;
 11  
 import javax.mail.internet.MimeMessage;
 12  
 
 13  
 import com.ozacc.mail.Mail;
 14  
 import com.ozacc.mail.MailBuildException;
 15  
 import com.ozacc.mail.MailException;
 16  
 import com.ozacc.mail.SendMail;
 17  
 import com.ozacc.mail.impl.MimeMessageBuilder;
 18  
 
 19  
 /**
 20  
  * SendMailImplクラスのMock。<br>
 21  
  * 実存す�?SMTPサーバを設定しても、実際には送信さ�?ません。
 22  
  * デバッグモードを有効にす�?と、メー�?を送信す�?タイミングでコンソー�?に送信メー�?内容が出力さ�?ます。
 23  
  * <p>
 24  
  * Mailインスタンス�? addExpectedMail() にセットし verify() メソッドを実行す�?と、send() さ�?たMailインスタンスと全てのプ��叢ティ(XHeader、添付ファイ�?を�?く)が�?致しなけ�?ばAssertionFailedExceptionがス��充さ�?ます。
 25  
  * <p>
 26  
  * 例えば、send() さ�?たMailインスタンスのFromアド�?スと�?名だけチェックし、その他のプ��叢ティはチェックしたくない�?合は、MockMailインスタンスを使用します。
 27  
  * <pre>Mail sentMail = new Mail();
 28  
  *sentMail.setFrom("from@example.com");
 29  
  *sentMail.setSubject("�?名");
 30  
  *sentMail.addTo("to@example.com");
 31  
  *sentMail.setText("動的生成さ�?�?本文");
 32  
  *
 33  
  *Mail expectedMail = new Mail();
 34  
  *expectedMail.setFrom("from@example.com");
 35  
  *expectedMail.setSubject("�?名");
 36  
  *
 37  
  *MockMail mockMail = new MockMail();
 38  
  *mockMail.setFrom("from@example.com");
 39  
  *mockMail.setSubject("�?名");
 40  
  *
 41  
  *MockSendMail sendMail = new MockSendMail();
 42  
  *sendMail.addExpectedMail(expectedMail);
 43  
  *sendMail.send(sentMail);
 44  
  *sendMail.verify(); // 失敗 AssertionFailedException
 45  
  *
 46  
  *sendMail = new MockSendMail();
 47  
  *sendMail.addExpectedMail(mockMail);
 48  
  *sendMail.send(sentMail);
 49  
  *sendMail.verify(); // 成�?</pre>
 50  
  * <p>
 51  
  * <strong>�?:</strong> 添付ファイ�?は比較対象になりません。
 52  
  * 
 53  
  * @since 1.0
 54  
  * @author Tomohiro Otsuka
 55  
  * @version $Id: MockSendMail.java,v 1.10.2.1 2004/11/25 08:01:47 otsuka Exp $
 56  
  */
 57  
 public class MockSendMail implements SendMail {
 58  
 
 59  
 	/** デフォ�?トのプ��組コ�?。「smtp」 */
 60  
 	public static final String DEFAULT_PROTOCOL = "smtp";
 61  
 
 62  
 	/** デフォ�?トのポート。「-1」 */
 63  
 	public static final int DEFAULT_PORT = -1;
 64  
 
 65  
 	/** デフォ�?トのSMTPサーバ。「localhost」 */
 66  
 	public static final String DEFAULT_HOST = "localhost";
 67  
 
 68  
 	/** ISO-2022-JP */
 69  
 	public static final String JIS_CHARSET = "ISO-2022-JP";
 70  
 
 71  
 	private static final String RETURN_PATH_KEY = "mail.smtp.from";
 72  
 
 73  10
 	private String protocol = DEFAULT_PROTOCOL;
 74  
 
 75  10
 	private String host = DEFAULT_HOST;
 76  
 
 77  10
 	private int port = DEFAULT_PORT;
 78  
 
 79  
 	private String username;
 80  
 
 81  
 	private String password;
 82  
 
 83  10
 	private String charset = JIS_CHARSET;
 84  
 
 85  
 	private String returnPath;
 86  
 
 87  
 	private List sentMails;
 88  
 
 89  
 	private List mimeMessages;
 90  
 
 91  
 	private List expectedMails;
 92  
 
 93  
 	private boolean debug;
 94  
 
 95  
 	/**
 96  
 	 * コンストラクタ。
 97  
 	 */
 98  
 	public MockSendMail() {
 99  10
 		super();
 100  10
 		initialize();
 101  10
 	}
 102  
 
 103  
 	/**
 104  
 	 * MockSendMailインスタンスを初�?化します。
 105  
 	 */
 106  
 	public void initialize() {
 107  14
 		sentMails = new ArrayList();
 108  14
 		expectedMails = new ArrayList();
 109  14
 		mimeMessages = new ArrayList();
 110  14
 	}
 111  
 
 112  
 	/**
 113  
 	 * 送信さ�?たメー�?のMimeMessageインスタンスを返します。
 114  
 	 * 送信順の配列です。
 115  
 	 * 
 116  
 	 * @return 送信メー�?のMimeMessageインスタンス配�?
 117  
 	 */
 118  
 	public MimeMessage[] getMimeMessages() {
 119  0
 		return (MimeMessage[])mimeMessages.toArray(new MimeMessage[mimeMessages.size()]);
 120  
 	}
 121  
 
 122  
 	/**
 123  
 	 * 送信さ�?たMailインスタンスを返します。送信順の配列です。
 124  
 	 * 
 125  
 	 * @return 送信メー�?のMailインスタンス配�?
 126  
 	 */
 127  
 	public Mail[] getSentMails() {
 128  0
 		return (Mail[])sentMails.toArray(new Mail[sentMails.size()]);
 129  
 	}
 130  
 
 131  
 	/**
 132  
 	 * デバッグモードが有効になってい�?か判定します。
 133  
 	 * 
 134  
 	 * @return Returns 有効になってい�?�?�? true
 135  
 	 */
 136  
 	public boolean isDebug() {
 137  0
 		return debug;
 138  
 	}
 139  
 
 140  
 	/**
 141  
 	 * デバッグモード(コンソー�?に��前を出力)を有効にします。
 142  
 	 * デフォ�?トは無効です。
 143  
 	 * 
 144  
 	 * @param debug デバッグモードを有効にす�?�?�? true
 145  
 	 */
 146  
 	public void setDebug(boolean debug) {
 147  9
 		this.debug = debug;
 148  9
 	}
 149  
 
 150  
 	/**
 151  
 	 * デバッグモードが有効のとき、指定さ�?たメッセージをコンソー�?に出力します。
 152  
 	 * 
 153  
 	 * @param message コンソー�?出力す�?メッセージ
 154  
 	 */
 155  
 	private void debug(String message) {
 156  175
 		if (debug) {
 157  480
 			System.out.println("[" + Thread.currentThread().getName() + "] DEBUG "
 158  160
 					+ getClass().getName() + " - " + message);
 159  
 		}
 160  175
 	}
 161  
 
 162  
 	/**
 163  
 	 * 
 164  
 	 * @param expectedMail
 165  
 	 */
 166  
 	public void addExpectedMail(Mail expectedMail) {
 167  13
 		expectedMails.add(expectedMail);
 168  13
 	}
 169  
 
 170  
 	/**
 171  
 	 * 
 172  
 	 * @param expectedMails
 173  
 	 */
 174  
 	public void addExpectedMail(Mail[] expectedMails) {
 175  0
 		for (int i = 0; i < expectedMails.length; i++) {
 176  0
 			addExpectedMail(expectedMails[i]);
 177  
 		}
 178  0
 	}
 179  
 
 180  
 	/**
 181  
 	 * 
 182  
 	 * @throws AssertionFailedException
 183  
 	 */
 184  
 	public void verify() throws AssertionFailedException {
 185  12
 		debug("======================================================");
 186  12
 		debug("                      verify()                        ");
 187  12
 		debug("======================================================");
 188  
 
 189  
 		// メー�?の数を比較
 190  12
 		int numOfExpectedMails = expectedMails.size();
 191  12
 		int numOfSentMails = sentMails.size();
 192  12
 		if (numOfExpectedMails != numOfSentMails) {
 193  3
 			throw new AssertionFailedException("�?待メー�?�?<" + numOfExpectedMails + ">と送信メー�?�?<"
 194  1
 					+ numOfSentMails + ">が�?致しませんでした。");
 195  
 		}
 196  
 
 197  11
 		debug("�?待メー�?数と送信メー�?数は�?致しました。[" + numOfExpectedMails + "通]");
 198  
 
 199  
 		// メー�?内容を比較
 200  16
 		for (int i = 0; i < numOfExpectedMails; i++) {
 201  11
 			Mail expected = (Mail)expectedMails.get(i);
 202  11
 			Mail sent = (Mail)sentMails.get(i);
 203  22
 			debug((i + 1) + "通目のチェックを開始します。("
 204  11
 					+ ((expected instanceof MockMail) ? "MockMail" : "Mail") + " - Mail)");
 205  11
 			checkEquality(expected, sent, i + 1);
 206  5
 			debug((i + 1) + "通目の�?待メー�?と送信メー�?内容は�?致しました。");
 207  
 		}
 208  
 
 209  5
 		debug("verifyプ��岨スは全て成功しました。");
 210  5
 		debug("======================================================");
 211  5
 	}
 212  
 
 213  
 	/**
 214  
 	 * @param expected
 215  
 	 * @param sent 
 216  
 	 * @throws AssertionFailedException
 217  
 	 */
 218  
 	public void checkEquality(Mail expected, Mail sent, int num) throws AssertionFailedException {
 219  11
 		boolean mockMode = (expected instanceof MockMail);
 220  
 
 221  
 		// マ�?チパートメー�?の�?�?
 222  11
 		if (expected.isMultipartMail()) {
 223  
 
 224  
 			// HTML
 225  3
 			if (!mockMode) {
 226  3
 				if ((expected.getHtmlText() == null && sent.getHtmlText() != class="keyword">null)
 227  3
 						|| (expected.getHtmlText() != null && sent.getHtmlText() == class="keyword">null)
 228  1
 						|| (!expected.getHtmlText().equals(sent.getHtmlText()))) {
 229  6
 					throwExceptioWithMessage("HTML本文", expected.getHtmlText(), sent.getHtmlText(),
 230  2
 							num);
 231  
 				}
 232  0
 			} else if (mockMode && expected.getHtmlText() != null) {
 233  0
 				if (!expected.getHtmlText().equals(sent.getHtmlText())) {
 234  0
 					throwExceptioWithMessage("HTML本文", expected.getHtmlText(), sent.getHtmlText(),
 235  0
 							num);
 236  
 				}
 237  
 			}
 238  
 		}
 239  
 
 240  
 		// Return-Path
 241  9
 		if (!mockMode || (mockMode && expected.getReturnPath() != null)) {
 242  7
 			if (expected.getReturnPath() != null && sent.getReturnPath() != class="keyword">null) {
 243  0
 				if (!expected.getReturnPath().equals(sent.getReturnPath())) {
 244  0
 					throwExceptioWithMessage("Return-Pathアド�?ス", expected.getReturnPath()
 245  0
 							.toUnicodeString(), sent.getReturnPath().toUnicodeString(), num);
 246  
 				}
 247  7
 			} else if ((expected.getReturnPath() != null && sent.getReturnPath() == class="keyword">null)
 248  7
 					|| (expected.getReturnPath() == null && sent.getReturnPath() != class="keyword">null)) {
 249  0
 				throw new AssertionFailedException();
 250  
 			}
 251  
 		}
 252  
 
 253  
 		// From
 254  9
 		if (!mockMode || (mockMode && expected.getFrom() != null)) {
 255  9
 			if (expected.getFrom() != null && sent.getFrom() != class="keyword">null) {
 256  9
 				if (!EqualityCheck.equals(expected.getFrom(), sent.getFrom())) {
 257  3
 					throwExceptioWithMessage("Fromアド�?ス", expected.getFrom().toUnicodeString(), sent
 258  2
 							.getFrom().toUnicodeString(), num);
 259  
 				}
 260  0
 			} else if ((expected.getFrom() != null && sent.getFrom() == class="keyword">null)
 261  0
 					|| (expected.getFrom() == null && sent.getFrom() != class="keyword">null)) {
 262  0
 				throw new AssertionFailedException();
 263  
 			}
 264  
 		}
 265  
 
 266  
 		// to
 267  8
 		InternetAddress[] expectedAddresses = expected.getTo();
 268  8
 		InternetAddress[] sentAddresses = sent.getTo();
 269  8
 		if (!mockMode || (mockMode && expectedAddresses.length > 0)) {
 270  7
 			if (expectedAddresses.length != sentAddresses.length) {
 271  3
 				throwExceptioWithMessage("Toアド�?ス�?", Integer.toString(expectedAddresses.length),
 272  1
 						Integer.toString(sentAddresses.length), num);
 273  
 			}
 274  10
 			for (int i = 0; i < expectedAddresses.length; i++) {
 275  6
 				if (!EqualityCheck.equals(expectedAddresses[i], sentAddresses[i])) {
 276  6
 					throwExceptioWithMessage("Toアド�?ス", expectedAddresses[i].toUnicodeString(),
 277  2
 							sentAddresses[i].toUnicodeString(), num);
 278  
 				}
 279  
 			}
 280  
 		}
 281  
 
 282  
 		// cc
 283  5
 		expectedAddresses = expected.getCc();
 284  5
 		sentAddresses = sent.getCc();
 285  5
 		if (!mockMode || (mockMode && expectedAddresses.length > 0)) {
 286  3
 			if (expectedAddresses.length != sentAddresses.length) {
 287  0
 				throwExceptioWithMessage("Ccアド�?ス�?", Integer.toString(expectedAddresses.length),
 288  0
 						Integer.toString(sentAddresses.length), num);
 289  
 			}
 290  3
 			for (int i = 0; i < expectedAddresses.length; i++) {
 291  0
 				if (!EqualityCheck.equals(expectedAddresses[i], sentAddresses[i])) {
 292  0
 					throwExceptioWithMessage("Ccアド�?ス", expectedAddresses[i].toUnicodeString(),
 293  0
 							sentAddresses[i].toUnicodeString(), num);
 294  
 				}
 295  
 			}
 296  
 		}
 297  
 
 298  
 		// bcc
 299  5
 		expectedAddresses = expected.getBcc();
 300  5
 		sentAddresses = sent.getBcc();
 301  5
 		if (!mockMode || (mockMode && expectedAddresses.length > 0)) {
 302  3
 			if (expectedAddresses.length != sentAddresses.length) {
 303  0
 				throwExceptioWithMessage("Bccアド�?ス�?", Integer.toString(expectedAddresses.length),
 304  0
 						Integer.toString(sentAddresses.length), num);
 305  
 			}
 306  3
 			for (int i = 0; i < expectedAddresses.length; i++) {
 307  0
 				if (!EqualityCheck.equals(expectedAddresses[i], sentAddresses[i])) {
 308  0
 					throwExceptioWithMessage("Bccアド�?ス", expectedAddresses[i].toUnicodeString(),
 309  0
 							sentAddresses[i].toUnicodeString(), num);
 310  
 				}
 311  
 			}
 312  
 		}
 313  
 
 314  
 		// Reply-To
 315  5
 		if (!mockMode || (mockMode && expected.getReplyTo() != null)) {
 316  3
 			if (expected.getReplyTo() != null && sent.getReplyTo() != class="keyword">null) {
 317  0
 				if (!EqualityCheck.equals(expected.getReplyTo(), sent.getReplyTo())) {
 318  0
 					throwExceptioWithMessage("ReplyToアド�?ス",
 319  0
 							expected.getReplyTo().toUnicodeString(), sent.getReplyTo()
 320  0
 									.toUnicodeString(), num);
 321  
 				}
 322  3
 			} else if ((expected.getReplyTo() != null && sent.getReplyTo() == class="keyword">null)
 323  3
 					|| (expected.getReplyTo() == null && sent.getReplyTo() != class="keyword">null)) {
 324  0
 				throw new AssertionFailedException();
 325  
 			}
 326  
 		}
 327  
 
 328  
 		// �?名
 329  5
 		if (!mockMode || (mockMode && expected.getSubject().length() > 0)) {
 330  5
 			if (!expected.getSubject().equals(sent.getSubject())) {
 331  0
 				throwExceptioWithMessage("�?名", expected.getSubject(), sent.getSubject(), num);
 332  
 			}
 333  
 		}
 334  
 
 335  
 		// 本文
 336  5
 		if (!mockMode || (mockMode && expected.getText().length() > 0)) {
 337  4
 			if (!expected.getText().equals(sent.getText())) {
 338  0
 				throwExceptioWithMessage("本文", expected.getText(), sent.getText(), num);
 339  
 			}
 340  
 		}
 341  
 
 342  5
 	}
 343  
 
 344  
 	/**
 345  
 	 * 引数の値を受けてエラーメッセージを生成し、AssertionFailedErrorをス��充します。
 346  
 	 * 
 347  
 	 * @param name �?致しなかった項目名
 348  
 	 * @param expectedValue �?待値
 349  
 	 * @param sentValue 実際値
 350  
 	 * @param num N番目のメー�?
 351  
 	 * @throws AssertionFailedException 生成さ�?た例外
 352  
 	 */
 353  
 	protected void throwExceptioWithMessage(String name, String expectedValue, String sentValue,
 354  
 											int num) throws AssertionFailedException {
 355  12
 		String message = num + "番目のメッセージで、「" + name + "」が�?致しませんでした。�?待値='" + expectedValue
 356  6
 				+ "', 送信値='" + sentValue + "'";
 357  
 
 358  6
 		debug(message);
 359  6
 		debug("verifyプ��岨スは失敗しました。");
 360  6
 		debug("******************************************************");
 361  
 
 362  6
 		throw new AssertionFailedException(message);
 363  
 	}
 364  
 
 365  
 	/**
 366  
 	 * @see com.ozacc.mail.SendMail#send(com.ozacc.mail.Mail)
 367  
 	 */
 368  
 	public void send(Mail mail) throws MailException {
 369  12
 		send(new Mail[] { mail });
 370  12
 	}
 371  
 
 372  
 	/**
 373  
 	 * @see com.ozacc.mail.SendMail#send(com.ozacc.mail.Mail[])
 374  
 	 */
 375  
 	public void send(Mail[] mails) throws MailException {
 376  12
 		debug("SMTPサーバ[" + host + "]に接続す�?フリ。");
 377  12
 		debug("SMTPサーバ[" + host + "]に接続したフリ。");
 378  
 
 379  12
 		Session session = Session.getInstance(new Properties());
 380  24
 		for (int i = 0; i < mails.length; i++) {
 381  
 
 382  12
 			Mail mail = mails[i];
 383  
 
 384  
 			// MimeMessageを生成
 385  12
 			MimeMessage message = new MimeMessage(session);
 386  12
 			MimeMessageBuilder builder = new MimeMessageBuilder(message);
 387  
 			try {
 388  12
 				builder.buildMimeMessage(mail);
 389  0
 			} catch (UnsupportedEncodingException e) {
 390  0
 				throw new MailBuildException("サポートさ�?ていない文字コードが指定さ�?ました。", e);
 391  0
 			} catch (MessagingException e) {
 392  0
 				throw new MailBuildException("MimeMessageの生成に失敗しました。", e);
 393  
 			}
 394  12
 			mimeMessages.add(message);
 395  
 
 396  12
 			debug("メー�?を送信す�?フリ。");
 397  12
 			sentMails.add(mail);
 398  12
 			debug(mail.toString());
 399  12
 			debug("メー�?を送信したフリ。");
 400  
 		}
 401  
 
 402  12
 		debug("SMTPサーバ[" + host + "]との接続を切断す�?フリ。");
 403  12
 		debug("SMTPサーバ[" + host + "]との接続を切断したフリ。");
 404  12
 	}
 405  
 
 406  
 	/**
 407  
 	 * @see com.ozacc.mail.SendMail#send(javax.mail.internet.MimeMessage)
 408  
 	 */
 409  
 	public void send(MimeMessage mimeMessage) throws MailException {
 410  0
 		throw new UnsupportedOperationException("申し訳ございません。MockSendMailでは、このメソッドをサポートしていません。");
 411  
 	}
 412  
 
 413  
 	/**
 414  
 	 * @see com.ozacc.mail.SendMail#send(javax.mail.internet.MimeMessage[])
 415  
 	 */
 416  
 	public void send(MimeMessage[] mimeMessages) throws MailException {
 417  0
 		throw new UnsupportedOperationException("申し訳ございません。MockSendMailでは、このメソッドをサポートしていません。");
 418  
 	}
 419  
 
 420  
 	/**
 421  
 	 * エンコーディングに使用す�?文字コードを返します。
 422  
 	 * 
 423  
 	 * @return エンコーディングに使用す�?文字コード
 424  
 	 */
 425  
 	public String getCharset() {
 426  0
 		return charset;
 427  
 	}
 428  
 
 429  
 	/**
 430  
 	 * メー�?の�?名や本文のエンコーディングに使用す�?文字コードを指定します。
 431  
 	 * デフォ�?トは ISO-2022-JP です。
 432  
 	 * 
 433  
 	 * @param charset エンコーディングに使用す�?文字コード
 434  
 	 */
 435  
 	public void setCharset(String charset) {
 436  0
 		this.charset = charset;
 437  0
 	}
 438  
 
 439  
 	/**
 440  
 	 * セットさ�?たSMTPサーバのホスト名、またはIPアド�?スを返します。
 441  
 	 * 
 442  
 	 * @return SMTPサーバのホスト名、またはIPアド�?ス
 443  
 	 */
 444  
 	public String getHost() {
 445  0
 		return host;
 446  
 	}
 447  
 
 448  
 	/**
 449  
 	 * SMTPサーバのホスト名、またはIPアド�?スをセットします。
 450  
 	 * デフォ�?トは localhost です。
 451  
 	 * 
 452  
 	 * @param host SMTPサーバのホスト名、またはIPアド�?ス
 453  
 	 */
 454  
 	public void setHost(String host) {
 455  0
 		this.host = host;
 456  0
 	}
 457  
 
 458  
 	/**
 459  
 	 * @return SMTPサーバ認証パス�?ード
 460  
 	 */
 461  
 	public String getPassword() {
 462  0
 		return password;
 463  
 	}
 464  
 
 465  
 	/**
 466  
 	 * SMTPサーバの接続認証が必要な�?合にパス�?ードをセットします。
 467  
 	 * 
 468  
 	 * @param password SMTPサーバ認証パス�?ード
 469  
 	 */
 470  
 	public void setPassword(String password) {
 471  0
 		this.password = password;
 472  0
 	}
 473  
 
 474  
 	/**
 475  
 	 * @return SMTPサーバのポート番�?
 476  
 	 */
 477  
 	public int getPort() {
 478  0
 		return port;
 479  
 	}
 480  
 
 481  
 	/**
 482  
 	 * SMTPサーバのポート番号をセットします。
 483  
 	 * 
 484  
 	 * @param port SMTPサーバのポート番�?
 485  
 	 */
 486  
 	public void setPort(int port) {
 487  0
 		this.port = port;
 488  0
 	}
 489  
 
 490  
 	/**
 491  
 	 * @return Returns the protocol.
 492  
 	 */
 493  
 	public String getProtocol() {
 494  0
 		return protocol;
 495  
 	}
 496  
 
 497  
 	/**
 498  
 	 * @param protocol The protocol to set.
 499  
 	 */
 500  
 	public void setProtocol(String protocol) {
 501  0
 		this.protocol = protocol;
 502  0
 	}
 503  
 
 504  
 	/**
 505  
 	 * @return Return-Pathアド�?ス
 506  
 	 */
 507  
 	public String getReturnPath() {
 508  0
 		return class="keyword">returnPath;
 509  
 	}
 510  
 
 511  
 	/**
 512  
 	 * Return-Pathアド�?スをセットします。
 513  
 	 * 
 514  
 	 * @param returnPath Return-Pathアド�?ス
 515  
 	 */
 516  
 	public void setReturnPath(String returnPath) {
 517  0
 		this.returnPath = returnPath;
 518  0
 	}
 519  
 
 520  
 	/**
 521  
 	 * @return SMTPサーバ認証ユーザ名
 522  
 	 */
 523  
 	public String getUsername() {
 524  0
 		return username;
 525  
 	}
 526  
 
 527  
 	/**
 528  
 	 * SMTPサーバの接続認証が必要な�?合にユーザ名をセットします。
 529  
 	 * 
 530  
 	 * @param username SMTPサーバ認証ユーザ名
 531  
 	 */
 532  
 	public void setUsername(String username) {
 533  0
 		this.username = username;
 534  0
 	}
 535  
 
 536  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.