Java Code Examples for com.icegreen.greenmail.util.ServerSetupTest#SMTP
The following examples show how to use
com.icegreen.greenmail.util.ServerSetupTest#SMTP .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConcurrentCloseIT.java From greenmail with Apache License 2.0 | 6 votes |
private void testThis() throws InterruptedException { final GreenMail greenMail = new GreenMail(ServerSetupTest.SMTP); greenMail.setUser("test@localhost", "test@localhost"); greenMail.start(); final SenderThread sendThread = new SenderThread(); try { sendThread.start(); greenMail.waitForIncomingEmail(3000, 1); final MimeMessage[] emails = greenMail.getReceivedMessages(); assertEquals(1, emails.length); sendThread.join(10000); } finally { greenMail.stop(); } if (sendThread.exc != null) { throw sendThread.exc; } }
Example 2
Source File: LifeCycleTest.java From QuizZz with MIT License | 5 votes |
@Before public void setup() { mvc = MockMvcBuilders.webAppContextSetup(context).apply(springSecurity()).build(); smtpServer = new GreenMail(ServerSetupTest.SMTP); smtpServer.start(); }
Example 3
Source File: MailOperatorFactoryTest.java From digdag with Apache License 2.0 | 5 votes |
@BeforeClass public static void smtpSetup() { ServerSetup servers[] = {ServerSetupTest.SMTP, ServerSetupTest.POP3}; greenMail = new GreenMail(servers); greenMail.start(); smtpPort = greenMail.getSmtp().getPort(); }
Example 4
Source File: MailServiceTest.java From Mario with Apache License 2.0 | 5 votes |
@Before public void setUp() { greenMail = new GreenMail(ServerSetupTest.SMTP); greenMail.setUser(MAIL_MESSAGE_TO, "toForTest", "forTest"); greenMail.start(); }
Example 5
Source File: EmailHandlerTest.java From robozonky with Apache License 2.0 | 4 votes |
private static ServerSetup getServerSetup() { final ServerSetup setup = ServerSetupTest.SMTP; setup.setServerStartupTimeout(5000); setup.setVerbose(true); return setup; }
Example 6
Source File: SimpleEmailServerValidatorTest.java From robozonky with Apache License 2.0 | 4 votes |
private static ServerSetup getServerSetup() { final ServerSetup setup = ServerSetupTest.SMTP; setup.setServerStartupTimeout(5000); setup.setVerbose(true); return setup; }
Example 7
Source File: EmailSettingsValidatorTest.java From robozonky with Apache License 2.0 | 4 votes |
private static ServerSetup getServerSetup() { final ServerSetup setup = ServerSetupTest.SMTP; setup.setServerStartupTimeout(5000); setup.setVerbose(true); return setup; }
Example 8
Source File: AdvancedEmailServerValidatorTest.java From robozonky with Apache License 2.0 | 4 votes |
private static ServerSetup getServerSetup() { final ServerSetup setup = ServerSetupTest.SMTP; setup.setServerStartupTimeout(5000); setup.setVerbose(true); return setup; }
Example 9
Source File: AbstractTest.java From smtp-connection-pool with Apache License 2.0 | 4 votes |
protected void startServer() { greenMail = new GreenMail(ServerSetupTest.SMTP); greenMail.start(); }
Example 10
Source File: SMTPMailSenderTest.java From email-notifier with Apache License 2.0 | 4 votes |
@Before public void setUp() { BasicConfigurator.configure(); mailServer = new GreenMail(ServerSetupTest.SMTP); mailServer.start(); }
Example 11
Source File: MailerIT.java From jeeshop with Apache License 2.0 | 4 votes |
@Before public void setUp() { server = new GreenMail(ServerSetupTest.SMTP); server.start(); }