[jboss-user] [JBoss Seam] - Re: Using EL in backend Java code?
samdoyle
do-not-reply at jboss.com
Wed Oct 31 19:56:20 EDT 2007
The only thing I see that resembles what I am looking for is some Test based examples which have no indication on how to do it in a Session Bean
| @Test
| public void testSayHello() throws Exception {
| new FacesRequest("/hello.jsp") {
| @Override
| protected void updateModelValues() throws Exception {
| setValue("#{person.name}","Michael Yuan");
| }
| @Override
| protected void invokeApplication() {
| assert getValue ("#{person.name}").equals("Michael Yuan");
| assert invokeMethod("#{manager.sayHello}") == null;
| assert getValue ("#{person.name}") == null;
| }
| @Override
| protected void renderResponse() {
| List<Person> fans =
| (List<Person>) getValue("#{fans}");
| assert fans!=null;
| assert fans.get(fans.size()-1)
| .getName().equals("Michael Yuan");
| }
| }.run();
| }
| TestNG-based
| The entire JSF lifecycle
| as well as database session
| are mocked
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100898#4100898
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100898
More information about the jboss-user
mailing list