[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1633) Mock Log

Bieth Bruno (JIRA) jira-events at lists.jboss.org
Tue Jul 10 05:42:31 EDT 2007


Mock Log
--------

                 Key: JBSEAM-1633
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1633
             Project: JBoss Seam
          Issue Type: Feature Request
            Reporter: Bieth Bruno
            Priority: Minor


I would like to unit test a Seam SFSB which uses an injected logger.
I didn't find any MockLog so I use the logging factory like that :
Code:

setField( editor, "log", Logging.getLog( "test" ) );	


It solves the NullPointerException and the test are working fine but when logging, the Interpolator try to access the context which doesnt exist and throws an IllegalStateException ...
It may be useful to have a mockLog method in the SeamTest class which look for a @Logger annotation and inject a MockLog. The MockLog will basically print any log on the console. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list