[jboss-user] [JBoss Seam] - Re: EntityController not testable?
nhpvti
do-not-reply at jboss.com
Mon Jul 23 08:27:03 EDT 2007
"christian.bauer at jboss.com" wrote : Run it inside a SeamTest.
|
Does your answer mean that EntityController subclasses can be tested in an integration test, but not in a unit test if they rely on a logger or faces messages?
public class MyEntityControllerTest extends SeamTest
| {
|
| @Test
| public void testEntityController()
| {
| try
| {
| new FacesRequest()
| {
| @Override
| protected void invokeApplication()
| {
| assert invokeMethod("#{myEntityController.save}").equals("OK");
| }
| }.run();
| } catch (Exception e)
| {
| Logging.getLog(MyEntityControllerTest.class).error(e.getMessage());
| }
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066623#4066623
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066623
More information about the jboss-user
mailing list