Package com.icegreen.greenmail.junit
Class GreenMailRule
java.lang.Object
com.icegreen.greenmail.configuration.ConfiguredGreenMail
com.icegreen.greenmail.util.GreenMailProxy
com.icegreen.greenmail.junit.GreenMailRule
- All Implemented Interfaces:
GreenMailOperations,MethodRule,TestRule
Deprecated.
Use com.icegreen.greenmail.junit4.GreenMailRule of module greenmail-junit4. Will be removed in GreenMail 2.0 .
GreenMail JUnit 4 rule for hooking GreenMail into test lifecycle (startup GreenMail, shutdown GreenMail).
The rule ensures that each test method starts with a clean GreenMail instance without relics from previous tests of current suite.
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.GreenMailRule(ServerSetup serverSetup) Deprecated.Initialize with single server setupsGreenMailRule(ServerSetup[] serverSetups) Deprecated.Initialize with multiple server setups -
Method Summary
Modifier and TypeMethodDescriptionapply(Statement base, Description description) Deprecated.apply(Statement base, FrameworkMethod method, Object target) Deprecated.protected GreenMailDeprecated.booleanDeprecated.Checks if GreenMail is up and running.Deprecated.Configure GreenMail instance using the given configurationMethods inherited from class com.icegreen.greenmail.util.GreenMailProxy
findReceivedMessages, getImap, getImaps, getManagers, getPop3, getPop3s, getReceivedMessages, getReceivedMessagesForDomain, getSmtp, getSmtps, getUserManager, loadEmails, purgeEmailFromAllMailboxes, reset, setQuotaSupported, setUser, setUser, setUsers, start, stop, waitForIncomingEmail, waitForIncomingEmailMethods inherited from class com.icegreen.greenmail.configuration.ConfiguredGreenMail
doConfigure
-
Constructor Details
-
GreenMailRule
Deprecated.Initialize with multiple server setups- Parameters:
serverSetups- All setups to use
-
GreenMailRule
Deprecated.Initialize with single server setups- Parameters:
serverSetup- Setup to use
-
GreenMailRule
public GreenMailRule()Deprecated.
-
-
Method Details
-
apply
Deprecated. -
apply
Deprecated.- Specified by:
applyin interfaceMethodRule
-
withConfiguration
Deprecated.Description copied from interface:GreenMailOperationsConfigure GreenMail instance using the given configuration- Specified by:
withConfigurationin interfaceGreenMailOperations- Overrides:
withConfigurationin classConfiguredGreenMail- Parameters:
config- Configuration to use- Returns:
- self (for method chaining)
-
isRunning
public boolean isRunning()Deprecated.Description copied from interface:GreenMailOperationsChecks if GreenMail is up and running.- Specified by:
isRunningin interfaceGreenMailOperations- Returns:
- true if ready to serve.
-
getGreenMail
Deprecated.- Specified by:
getGreenMailin classGreenMailProxy- Returns:
- Greenmail instance provided by child class
-