| MockAuthenticator | Line # 16 | 5 | 4 | 100% |
1.0
|
| (1) | |||
| Result | |||
|
1.0
|
test.atlassian.mail.server.TestSMTPMailServer.testGetSessionWithUser
test.atlassian.mail.server.TestSMTPMailServer.testGetSessionWithUser
|
1 PASS | |
| 1 | /* | |
| 2 | * Created by IntelliJ IDEA. | |
| 3 | * User: owen | |
| 4 | * Date: Dec 6, 2002 | |
| 5 | * Time: 1:41:02 PM | |
| 6 | * CVS Revision: $Revision: 1.2 $ | |
| 7 | * Last CVS Commit: $Date: 2003/09/30 07:27:55 $ | |
| 8 | * Author of last CVS Commit: $Author: mcannon $ | |
| 9 | * To change this template use Options | File Templates. | |
| 10 | */ | |
| 11 | package test.mock.mail; | |
| 12 | ||
| 13 | import javax.mail.Authenticator; | |
| 14 | import javax.mail.PasswordAuthentication; | |
| 15 | ||
| 16 | public class MockAuthenticator extends Authenticator | |
| 17 | { | |
| 18 | private String username; | |
| 19 | private String password; | |
| 20 | ||
| 21 | 1 |
public MockAuthenticator(String username, String password) |
| 22 | { | |
| 23 | 1 | this.username = username; |
| 24 | 1 | this.password = password; |
| 25 | } | |
| 26 | ||
| 27 | 1 |
public PasswordAuthentication getPasswordAuthentication() |
| 28 | { | |
| 29 | 1 | return new PasswordAuthentication(getUsername(), getPassword()); |
| 30 | } | |
| 31 | ||
| 32 | 1 |
public String getUsername() |
| 33 | { | |
| 34 | 1 | return username; |
| 35 | } | |
| 36 | ||
| 37 | 1 |
public String getPassword() |
| 38 | { | |
| 39 | 1 | return password; |
| 40 | } | |
| 41 | } | |
|
||||||||||