T
- the type of thispublic abstract class DisposableMailSupport<T extends DisposableMailSupport<T>> extends AbstractModuleFixture<T> implements Disposable
GreenMail
library and makes sure it is
properly shut down.
Creates two server setups, one for sending and one for receiving. Depending on the type of module being tested, one will be used as the real server and the other will be used to interact with the former, or vice-versa.
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ADMIN_PASSWORD |
protected static java.lang.String |
ADMIN_USER |
protected com.icegreen.greenmail.util.GreenMail |
greenMail |
label
Constructor and Description |
---|
DisposableMailSupport() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Free up resources that this fixture may have created.
|
protected T |
ensureNotStarted() |
T |
ensureStarted() |
protected abstract com.icegreen.greenmail.util.ServerSetup |
setupReceiveServer()
Provide configuration options for the "receive" part of the fixture.
|
protected abstract com.icegreen.greenmail.util.ServerSetup |
setupSendServer()
Provide configuration options for the "send" part of the fixture.
|
label, toDSL, toString
protected static final java.lang.String ADMIN_USER
protected static final java.lang.String ADMIN_PASSWORD
protected com.icegreen.greenmail.util.GreenMail greenMail
public void cleanup()
Disposable
cleanup
in interface Disposable
protected T ensureNotStarted()
public T ensureStarted()
protected abstract com.icegreen.greenmail.util.ServerSetup setupSendServer()
protected abstract com.icegreen.greenmail.util.ServerSetup setupReceiveServer()