Package org.subethamail.wiser

Examples of org.subethamail.wiser.Wiser.start()


  {
    Wiser wiser = new Wiser();
    wiser.setPort(PORT);
    wiser.getServer().setConnectionTimeout(1000);

    wiser.start();

    Socket sock = new Socket(InetAddress.getLocalHost(), PORT);
    OutputStream out = sock.getOutputStream();
    PrintWriter writer = new PrintWriter(new OutputStreamWriter(out));
View Full Code Here


  private void startStop(boolean pause) throws Exception
  {
    Wiser wiser = new Wiser();
    wiser.setPort(PORT);

    wiser.start();

    if (pause)
      Thread.sleep(1000);

    wiser.stop();
View Full Code Here

  {
    Wiser wiser = new Wiser();
    wiser.setHostname("localhost");
    wiser.setPort(PORT);

    wiser.start();

    String line;
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

    do
View Full Code Here

        ServletActionContext.setResponse(new MockHttpServletResponse());

        // start SMTP Server
        final Wiser wiser = new Wiser();
        wiser.setPort(getSmtpPort());
        wiser.start();

        assertNull(action.getUser().getId());
        assertEquals("success", action.save());
        assertFalse(action.hasActionErrors());
        assertNotNull(action.getUser().getId());
View Full Code Here

    @Test
    public void testExecute() throws Exception {
        // start SMTP Server
        Wiser wiser = new Wiser();
        wiser.setPort(getSmtpPort());
        wiser.start();
       
        action.setUsername("user");
        assertEquals("success", action.execute());
        assertFalse(action.hasActionErrors());
View Full Code Here

        Wiser wiser = new Wiser();
        // set the port to a random value so there's no conflicts between tests
        int port = 2525 + (int)(Math.random() * 100);
        mailSender.setPort(port);
        wiser.setPort(port);
        wiser.start();
       
        Date dte = new Date();
        this.mailMessage.setTo("foo@bar.com");
        String emailSubject = "grepster testSend: " + dte;
        String emailBody = "Body of the grepster testSend message sent at: " + dte;
View Full Code Here

    @Test
    public void testActivate() throws Exception {
        // start SMTP Server
        Wiser wiser = new Wiser();
        wiser.setPort(getSmtpPort());
        wiser.start();

        doc = tester.renderPage("passwordRecoveryToken/admin");

        // verify an account information e-mail was sent
        wiser.stop();
View Full Code Here

        fieldValues.put("postalCode", "80210");

        // start SMTP Server
        Wiser wiser = new Wiser();
        wiser.setPort(getSmtpPort());
        wiser.start();

        TestableResponse response = tester.submitFormAndReturnResponse(form, fieldValues);

        assertFalse(response.getOutput().contains("exception"));
View Full Code Here

        fieldValues.put("postalCode", "80210");

        // start SMTP Server
        Wiser wiser = new Wiser();
        wiser.setPort(getSmtpPort());
        wiser.start();

        TestableResponse response = tester.submitFormAndReturnResponse(form, fieldValues);
        assertEquals(response.getRedirectURL(), "signup");

        // verify no account information e-mail was sent
View Full Code Here

        request.addParameter("username", "user");

       // start SMTP Server
        Wiser wiser = new Wiser();
        wiser.setPort(getSmtpPort());
        wiser.start();
       
        c.handleRequest(request);
       
        // verify an account information e-mail was sent
        wiser.stop();
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.