Class GreenMailExtension

    • Constructor Detail

      • GreenMailExtension

        public GreenMailExtension​(com.icegreen.greenmail.util.ServerSetup serverSetup)
        Initialize with single server setups.
        Parameters:
        serverSetup - Setup to use
      • GreenMailExtension

        public GreenMailExtension()
        Initialize with all server setups.
      • GreenMailExtension

        public GreenMailExtension​(com.icegreen.greenmail.util.ServerSetup[] serverSetups)
        Initialize with multiple server setups.
        Parameters:
        serverSetups - All setups to use
    • Method Detail

      • withPerMethodLifecycle

        public GreenMailExtension withPerMethodLifecycle​(boolean perMethod)
        Specify whether GreenMail should be set up and torn down before and after each method or before and after all methods.
        Parameters:
        perMethod - If true, per-method lifecycle is used, per-class otherwise.
        Returns:
        The GreenMail extension for chaining calls.
      • getGreenMail

        protected com.icegreen.greenmail.util.GreenMail getGreenMail()
        Specified by:
        getGreenMail in class com.icegreen.greenmail.util.GreenMailProxy
      • withConfiguration

        public GreenMailExtension withConfiguration​(com.icegreen.greenmail.configuration.GreenMailConfiguration config)
        Specified by:
        withConfiguration in interface com.icegreen.greenmail.base.GreenMailOperations
        Overrides:
        withConfiguration in class com.icegreen.greenmail.configuration.ConfiguredGreenMail
      • isRunning

        public boolean isRunning()
        Specified by:
        isRunning in interface com.icegreen.greenmail.base.GreenMailOperations