Package org.subethamail.wiser

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


    Thread.sleep(2000);

    writer.print("HELO bar\r\n");
    assert(writer.checkError());

    wiser.stop();
  }

  /** */
  public static Test suite()
  {
View Full Code Here


    wiser.start();

    if (pause)
      Thread.sleep(1000);

    wiser.stop();

    this.counter++;
  }

  /** */
 
View Full Code Here

        out.close();
      }
    }
    while (!"quit".equals(line));

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

        assertEquals("success", action.save());
        assertFalse(action.hasActionErrors());
        assertNotNull(action.getUser().getId());

        // verify an account information e-mail was sent
        wiser.stop();
        assertTrue(wiser.getMessages().size() == 1);

        // verify that success messages are in the session
        assertNotNull(action.getSession().getAttribute(Constants.REGISTERED));
        // try it again with same user
View Full Code Here

        action.setUsername("user");
        assertEquals("success", action.execute());
        assertFalse(action.hasActionErrors());

        // verify an account information e-mail was sent
        wiser.stop();
        assertTrue(wiser.getMessages().size() == 1);

        // verify that success messages are in the request
        assertNotNull(action.getSession().getAttribute("messages"));
    }
View Full Code Here

        String emailBody = "Body of the grepster testSend message sent at: " + dte;
        this.mailMessage.setSubject(emailSubject);
        this.mailMessage.setText(emailBody);
        this.mailEngine.send(this.mailMessage);
       
        wiser.stop();
        assertTrue(wiser.getMessages().size() == 1);
        WiserMessage wm = wiser.getMessages().get(0);
        assertEquals(emailSubject, wm.getMimeMessage().getSubject());
        assertEquals(emailBody, wm.getMimeMessage().getContent());
    }
View Full Code Here

        wiser.start();

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

        // verify an account information e-mail was sent
        wiser.stop();
        assertTrue(wiser.getMessages().size() == 1);

        assertTextPresent(doc, "A password reset link was sent to your registered email address.");
    }
View Full Code Here

        assertFalse(response.getOutput().contains("exception"));

        // verify an account information e-mail was sent
        assertEquals(1, wiser.getMessages().size());
        wiser.stop();

        SecurityContextHolder.getContext().setAuthentication(null);
    }

    @Test
View Full Code Here

        wiser.start();
       
        c.handleRequest(request);
       
        // verify an account information e-mail was sent
        wiser.stop();
        assertTrue(wiser.getMessages().size() == 1);
       
        // verify that success messages are in the session
        assertNotNull(request.getSession().getAttribute(BaseFormController.MESSAGES_KEY));
    }
View Full Code Here

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

        // verify no account information e-mail was sent
        assertEquals(0, wiser.getMessages().size());
        wiser.stop();

        SecurityContextHolder.getContext().setAuthentication(null);
    }

}
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.