What is the most effective way of unit testing JSF 2.0 managed beans. I have seen JSFUnit from JBoss but it looks like its for testing the components in the facelets pages but not the managed beans themselves.
I want to find a way to effectively unit test only the managed beans.
Any ideas?
Set up your managed beans so that all their dependencies are injected as managed properties via setters. Then you can manually inject mocks or stubs in your unit tests.
JSFUnit is another alternative
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With