"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).

HTH

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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to