[jboss-user] [JBoss Seam] - Re: Seam Email and Embeddedable EJB3 for testing

RefuX do-not-reply at jboss.com
Thu Aug 16 10:57:07 EDT 2007


I'm writing a similar integration test.
However I'm running into a different issue (user error no doubt!).

Using Seam 1.2.1GA.

So I have a MailService component that has a line like this
    
  | @In(create = true)
  | private Renderer renderer;
  | 

In my test I'm doing this:

  | 	       new FacesRequest() {
  | 	            protected void invokeApplication() throws Exception {
  | 	            	MailService mailService = (MailService) Component.getInstance("mailService", true);
  | 	            	
  | 	            	mailService.send("view/emailLoggedIn.xhtml");
  | 	            }
  | 	        }.run();		
  | 

Unfortunately the MockRenderKit never seems to come into play for me. My error is:
anonymous wrote : 
  |   [testng] FAILED: testIfWeCanRender
  |    [testng] java.lang.UnsupportedOperationException
  |    [testng] at org.jboss.seam.mock.MockApplication.createComponent(MockApplication.java:154)
  |    [testng] at org.jboss.seam.jsf.SeamApplication11.createComponent(SeamApplication11.java:71)
  |    [testng] at com.sun.facelets.tag.jsf.ComponentHandler.createComponent(ComponentHandler.java:243)
  |    [testng] at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:139)
  |    [testng] at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
  |    [testng] at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
  |    [testng] at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
  |    [testng] at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:149)
  |    [testng] at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:112)
  |    [testng] at refux.service.impl.MailServiceImpl.send(MailServiceImpl.java:41)
  |    [testng] at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
  |    [testng] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
  |    [testng] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
  |    [testng] at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
  |    [testng] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |    [testng] at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
  |    [testng] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |    [testng] at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
  |    [testng] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |    [testng] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
  |    [testng] at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
  |    [testng] at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
  |    [testng] at refux.service.impl.MailServiceImpl_$$_javassist_0.send(MailServiceImpl_$$_javassist_0.java)
  |    [testng] at refux.service.impl.MailServiceImplTest_Integration$1.invokeApplication(MailServiceImplTest_Integration.java:44)
  |    [testng] at org.jboss.seam.mock.SeamTest$Request.run(SeamTest.java:489)
  |    [testng] at refux.service.impl.MailServiceImplTest_Integration.testIfWeCanRender(MailServiceImplTest_Integration.java:37)
  |    [testng] ... Removed 26 stack frames
  | 

Thanks for any help!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074879#4074879

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074879



More information about the jboss-user mailing list