Package com.icegreen.greenmail.util

Examples of com.icegreen.greenmail.util.GreenMail.stop()


            in.close();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            assertNotNull(finalOutput, "Result cannot be null");
            greenMail.stop();
        }

    }

    @Test(groups = {"jaggery"},
View Full Code Here


            in.close();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            assertEquals(finalOutput, "email successfully sent");
            greenMail.stop();
        }

    }

    @Test(groups = {"jaggery"},
View Full Code Here

            e.printStackTrace();
        } catch (MessagingException e) {
            e.printStackTrace();
        } finally {
            assertEquals(subject, "Test Subject");
            greenMail.stop();
        }

    }

}
View Full Code Here

      // check that email is still there
      Assert.assertEquals(greenMail.getReceivedMessages().length, 1);

    } finally {
      greenMail.stop();
    }
  }

  @Test(enabled=false)
  public void shouldRetrieveTextFromMultipartMessage() throws Exception {
View Full Code Here

      Message message = messageProducer.getMessage(0);
      Assert.assertNotNull(message);
      Assert.assertEquals(message.getProperty("text", String.class), body);
    } finally {
      greenMail.stop();
    }
  }

  @Test
  public void shouldTimeoutIfInvalidPort() throws Exception {
View Full Code Here

    receiver.doStart();

    waitUntilStatus(receiver, 20000, Status.FAILED);

    receiver.doStop();
    greenMail.stop();
  }

  private void waitUntilStatus(MailReceiver connector, long timeout, Status status) {
    boolean isValid = false;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.