[jboss-user] [JBoss Seam] - Re: Using rich:datascroller With Seam and Hibernate Paginati

pete.muir@jboss.org do-not-reply at jboss.com
Tue Feb 5 17:43:36 EST 2008

"neilac333" wrote : My Seam action component has a listener method that handles the passing of the desired page number from the client to the search code, and this method takes a DataScrollerEvent parameter.  This is an object unique to RichFaces.  How can I test the overall function of my action class?In general, when testing Seam components that have dependencies on FacesEvent classes and so on, what is the best way to test these?  Is there an existing mock library?  

I think you are on the right path with mocks. Ask on the RichFaces forum too, I know Alex has some testing stuff in RichFaces. Alternatively, you can look at JSFUnit.

anonymous wrote : Should I write my own stub for such a class?

If you do, let us know what you do, this could be interesting for Seam.

anonymous wrote : Should the test be an integration test that generates a real DataScrollerEvent within JBoss embedded?

Seam integration tests don't reach down as far as the view layer, but simulate (mock out) JSF. We don't have any support for mock FacesEvents, but I would definitely accept this as an extension to Seam test. Again, you could look at JSFUnit (it's a new project, but it looks very interesting - I'm hoping that we can start using it in the seam testsuite soon).


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

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

More information about the jboss-user mailing list