Package com.dumbster.smtp

Examples of com.dumbster.smtp.SimpleSmtpServer.stop()


      action.setPasswordConfirm("poploop");
      action.setEmail("johnp@example.com");
      String op = action.execute();
      assertEquals(ActionSupport.SUCCESS, op);
    } finally {
      mailServer.stop();
    }
    assertTrue(mailServer.getReceivedEmailSize() == 1);
    Iterator<SmtpMessage> emailIter = mailServer.getReceivedEmail();
    SmtpMessage email = (SmtpMessage) emailIter.next();
    assertTrue(email.getHeaderValue("Subject").equals("Email Verification"));
View Full Code Here


    try {
      action.setUsername("hchen1");
      String op = action.doRenewUserAccount();
      assertEquals(ActionSupport.SUCCESS, op);
    } finally {
      mailServer.stop();
    }
    assertTrue(mailServer.getReceivedEmailSize() == 1);
    Iterator<SmtpMessage> emailIter = mailServer.getReceivedEmail();
    SmtpMessage email = (SmtpMessage) emailIter.next();
    assertTrue(email.getHeaderValue("Subject").equals("Email Verification"));
View Full Code Here

    try {
      action.setUsername("gnizr");
      String op = action.doRenewUserAccount();
      assertEquals(ActionSupport.INPUT, op);
    } finally {
      mailServer.stop();
    }
    assertTrue(mailServer.getReceivedEmailSize() == 0);
   
    User user = userManager.getUser("gnizr");
    assertEquals(AccountStatus.ACTIVE,user.getAccountStatus().intValue());
View Full Code Here

    try {
      action.setUsername("poopppp");
      String op = action.doRenewUserAccount();
      assertEquals(ActionSupport.INPUT, op);
    } finally {
      mailServer.stop();
    }
    assertTrue(mailServer.getReceivedEmailSize() == 0);
  }
 
 
View Full Code Here

      action.setPasswordConfirm("poploop");
      action.setEmail("johnp@example.com");
      String op = action.execute();
      assertEquals(ActionSupport.SUCCESS, op);
    } finally {
      mailServer.stop();
    }
    assertTrue(mailServer.getReceivedEmailSize() == 2);
    Iterator<SmtpMessage> emailIter = mailServer.getReceivedEmail();
    SmtpMessage email = (SmtpMessage) emailIter.next();
    assertTrue(email.getHeaderValue("Subject").equals("Account Registration Pending"));
View Full Code Here

    try {
      action.setUsername("hchen1");
      String op = action.execute();
      assertEquals(ActionSupport.SUCCESS, op);
    } finally {
      mailServer.stop();
    }
    assertTrue(mailServer.getReceivedEmailSize() == 1);
    Iterator<SmtpMessage> emailIter = mailServer.getReceivedEmail();
    SmtpMessage email = (SmtpMessage) emailIter.next();
    assertTrue(email.getHeaderValue("Subject").equals("Reset Password"));
View Full Code Here

      action.setToken(token);
   
      String op = action.doApproveActivationRequest();
      assertEquals(ActionSupport.SUCCESS,op);
    }finally{
      mailServer.stop();
    }
   
    user = userManager.getUser(username);
    assertEquals(AccountStatus.ACTIVE,user.getAccountStatus().intValue());   
    assertFalse(tokenManager.isValidResetToken(token, user));
View Full Code Here

        SimpleSmtpServer smtp = SimpleSmtpServer.start(mockStation
                .getSmtpServerPort());
        replay(mockEmailRenderer);
        jizzEmailServices.confirmEmailAddress(mockDj);
        smtp.stop();
        verify(mockEmailRenderer);

        assertEquals(1, smtp.getReceivedEmailSize());
        SmtpMessage msg = (SmtpMessage) smtp.getReceivedEmail().next();
View Full Code Here

        Errors errors =
            (Errors) mv.getModel().get(BindException.MODEL_KEY_PREFIX + "user");
        assertTrue("no errors returned in model", errors == null);
       
        // verify an account information e-mail was sent
        server.stop();
        assertTrue(server.getReceivedEmailSize() == 1);
       
        // verify that success messages are in the request
        assertNotNull(request.getSession().getAttribute("successMessages"));
        assertNotNull(request.getSession().getAttribute(Constants.REGISTERED));
View Full Code Here

        SimpleSmtpServer server = SimpleSmtpServer.start(2525);
       
        c.handleRequest(request, new MockHttpServletResponse());
       
        // verify an account information e-mail was sent
        server.stop();
        assertTrue(server.getReceivedEmailSize() == 1);
       
        // verify that success messages are in the session
        assertNotNull(request.getSession().getAttribute("messages"));
    }
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.