|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.it.mail.MailFacade
public class MailFacade
Provides common Mail methods for getting mail messages and setting User mail preferences.
Field Summary | |
---|---|
static String |
TEST_POP_SERVER_NAME
|
static String |
TESTMAILSERVER_HOSTNAME
|
Constructor Summary | |
---|---|
MailFacade(ConfluenceRpc rpc)
|
Method Summary | |
---|---|
void |
addMailboxesForUsers(User... users)
|
void |
addMailboxForUser(MailUser user)
|
void |
addMailboxForUser(User user)
|
void |
addPopMailServer(String username,
String password,
String toAddress)
|
void |
changeSmtpFromName(String fromName)
|
void |
changeSmtpServerHost(String hostname,
int port)
|
javax.mail.internet.MimeMessage |
getExpectedMessage()
|
javax.mail.internet.MimeMessage[] |
getExpectedMessages(int expectedMessages)
|
javax.mail.internet.MimeMessage[] |
getMessages()
|
int |
getPopPort()
|
javax.mail.internet.MimeMessage |
getReceivedMessage()
|
boolean |
noMessages()
|
void |
removeMailServer()
|
void |
removeMailServer(String serverName)
|
void |
reset()
|
void |
send(String to,
String from,
String subject,
String body)
|
MailFacade |
start()
Starts up and configures a new mail server which will be pulled back down during test tearDown. |
void |
startMailServerOnly()
Starts the mail server, but DOESN'T configure Confluence to use it. |
MailFacade |
startSoleServer()
Same as start() except it removes all existing mail servers if any are configured. |
void |
stop()
|
int |
waitForEmail(int numberOfEmails)
Fetches the given count of emails |
void |
watchAsHtmlWithDiffs(User user)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TESTMAILSERVER_HOSTNAME
public static final String TEST_POP_SERVER_NAME
Constructor Detail |
---|
public MailFacade(ConfluenceRpc rpc)
Method Detail |
---|
public MailFacade startSoleServer() throws BindException
start()
except it removes all existing mail servers if any are configured.
It is your responsibility to ensure that stop()
is eventually called once you call this method.
BindException
- If a free port could not be foundpublic MailFacade start() throws BindException
stop()
is eventually called once you call this method.
BindException
- If a free port could not be foundpublic void startMailServerOnly() throws BindException
BindException
public void addMailboxesForUsers(User... users)
public void addMailboxForUser(User user)
public void addMailboxForUser(MailUser user)
public javax.mail.internet.MimeMessage getReceivedMessage() throws Exception
Exception
public javax.mail.internet.MimeMessage[] getExpectedMessages(int expectedMessages)
public javax.mail.internet.MimeMessage[] getMessages()
public boolean noMessages()
public void stop()
public void removeMailServer(String serverName)
public void removeMailServer()
public void changeSmtpServerHost(String hostname, int port)
public void changeSmtpFromName(String fromName)
public void reset() throws com.icegreen.greenmail.store.FolderException
com.icegreen.greenmail.store.FolderException
public int waitForEmail(int numberOfEmails)
numberOfEmails
- the number of expected emails
public void send(String to, String from, String subject, String body)
public int getPopPort()
public javax.mail.internet.MimeMessage getExpectedMessage()
public void watchAsHtmlWithDiffs(User user)
public void addPopMailServer(String username, String password, String toAddress)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |