Is there a full example showing how to use JSF Mockito? especialy how to use is to mock managed beans
JSF-Mockito does mock only JSF API interfaces like FacesContext, Application, etc.
For managed beans, you can use Mockito directly.
In case you are not using FacesContext directly in your bean, use just plain Mockito.
But if you use FacesContext, then you can mock using FacesMockitoRunner in following way:
and how we can expect result from actionListner method? should i mock ActionEvent ...
When mocking, you use mock all the interfaces which you managed bean cooperates with.
But your usecase is rather validation of behavior in targetted environment.
I think this usecase is already going behind the scope of mocking and you should rather use some tools like Arquillian and/or JSFUnit.
Thanks a lot!
that respond to my answer ;-)
that confirm my doubt about doing that with mock