This content has been marked as final.
Show 3 replies
-
1. Re: Testing the EmailTemplate using SeamTest
ifischer Nov 19, 2009 11:06 PM (in response to sunilinteti)I'm having the same problem.
Seam 2.2.0GA, project created with seam-gen.
No matter what i try, the renderedMessage always becomes null in my test:@Test public void testRegistrieren() throws Exception { new FacesRequest() { @Override protected void renderResponse() throws Exception { MimeMessage renderedMessage = getRenderedMailMessage("mail/customer_activation_mail.xhtml"); // Throws a NullPointerException assertEquals(renderedMessage.getAllRecipients().length, 1); } }.run(); }
Anybody got a solution?
-
2. Re: Testing the EmailTemplate using SeamTest
ifischer Nov 19, 2009 11:20 PM (in response to sunilinteti)Sorry, of course the getRenderedMailMessage has to be invoked in the invokeApplicationPhase. Anyway, still the same error (NullPointerException)
-
3. Re: Testing the EmailTemplate using SeamTest
ifischer Nov 19, 2009 11:31 PM (in response to sunilinteti)Oh no, so simple ;)
The jboss-seam-mail.jar was missing on the test classpath!