JSF tests?
"Hiller, Dean" <[email protected]>
| Newsgroups | gmane.comp.jakarta.cactus.user |
|---|---|
| Message-ID | <52AB1243526C77459939EBB7976B622F04DD214A@newman.carrieraccess.com> |
I have a JSF web app(that is starting) and I am accustomed to test first with typical pojo server development. I would like to somehow achieve the same, and here is what I would like to do.... I have an external system I interact with and I have to mock that system so I can introduce failures and such(I can't force the other system to force those failures but know that they happen in the field). So I wil naturally need some mock.throwException() stuff in my test. Now, also I went through the example but they don't seem to pertain to what I am doing. I need a good JSF example where I can just fill in params in a servletrequest and have that sent in and JSF Servlet will route the request, call some things and I will expect some mock stuff to happen and lastly just expect that some backing beans in JSF have the right values as well as the action returning "success" or "failure" or something. Any tutorials on how to do this? My main problem is I want to test the interation between the ServletContextListener a Filter and JSF javabeans. Any ideas? I am thinking I may just pretend to be JSF and call the ServletContextListener, and my filter and my bean and act as JSF. I just wish someone else could do that for me. I still need the mocks though under the web app and still need to expect stuff and trigger events from the mocks as the web app added listeners to the mocks and I fire back to them. Thanks, Dean