Package com.dumbster.smtp

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


    SmtpMessage email = (SmtpMessage) server.getReceivedEmail().next();
    Assert.assertTrue(email.getHeaderValue("Subject").equals("Mokai Message"));
    Assert.assertTrue(email.getHeaderValue("From").equals("mokai@localhost.com"));
    Assert.assertTrue(email.getBody().equals("This is a test"));

    server.stop();
  }

  @Test
  public void shouldSendEmailOverridingConfig() throws Exception {
    SimpleSmtpServer server = SimpleSmtpServer.start(2000); // this starts a fake STMP Server on the specified port
View Full Code Here


    SmtpMessage email = (SmtpMessage) server.getReceivedEmail().next();
    Assert.assertTrue(email.getHeaderValue("Subject").equals("This is the subject"));
    Assert.assertTrue(email.getHeaderValue("From").equals("test@localhost"));
    Assert.assertTrue(email.getBody().equals("This is a test"));

    server.stop();
  }
}
View Full Code Here

       
        assertEquals(bean.save(), "mainMenu");
        assertFalse(bean.hasErrors());
       
        // verify an account information e-mail was sent
        server.stop();
        assertTrue(server.getReceivedEmailSize() == 1);

        // verify that success messages are in the session
        assertNotNull(bean.getSession().getAttribute(Constants.REGISTERED));
    }
View Full Code Here

       
        assertEquals(bean.execute(), "success");
        assertFalse(bean.hasErrors());

        // verify an account information e-mail was sent
        server.stop();
        assertTrue(server.getReceivedEmailSize() == 1);
       
        // verify that success messages are in the request
        assertNotNull(bean.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.