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 public class GreenMailRule extends GreenMailProxy implements 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
Constructors Constructor Description GreenMailRule()Deprecated.GreenMailRule(ServerSetup serverSetup)Deprecated.Initialize with single server setupsGreenMailRule(ServerSetup[] serverSetups)Deprecated.Initialize with multiple server setups
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Statementapply(Statement base, Description description)Deprecated.Statementapply(Statement base, FrameworkMethod method, Object target)Deprecated.protected GreenMailgetGreenMail()Deprecated.booleanisRunning()Deprecated.Checks if GreenMail is up and running.GreenMailRulewithConfiguration(GreenMailConfiguration config)Deprecated.Configure GreenMail instance using the given configuration-
Methods inherited from class com.icegreen.greenmail.util.GreenMailProxy
getImap, getImaps, getManagers, getPop3, getPop3s, getReceivedMessages, getReceivedMessagesForDomain, getSmtp, getSmtps, getUserManager, purgeEmailFromAllMailboxes, reset, setQuotaSupported, setUser, setUser, setUsers, start, stop, waitForIncomingEmail, waitForIncomingEmail
-
Methods inherited from class com.icegreen.greenmail.configuration.ConfiguredGreenMail
doConfigure
-
-
-
-
Constructor Detail
-
GreenMailRule
public GreenMailRule(ServerSetup[] serverSetups)
Deprecated.Initialize with multiple server setups- Parameters:
serverSetups- All setups to use
-
GreenMailRule
public GreenMailRule(ServerSetup serverSetup)
Deprecated.Initialize with single server setups- Parameters:
serverSetup- Setup to use
-
GreenMailRule
public GreenMailRule()
Deprecated.
-
-
Method Detail
-
apply
public Statement apply(Statement base, Description description)
Deprecated.
-
apply
public Statement apply(Statement base, FrameworkMethod method, Object target)
Deprecated.- Specified by:
applyin interfaceMethodRule
-
withConfiguration
public GreenMailRule withConfiguration(GreenMailConfiguration config)
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
protected GreenMail getGreenMail()
Deprecated.- Specified by:
getGreenMailin classGreenMailProxy- Returns:
- Greenmail instance provided by child class
-
-