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

Pete Muir (JIRA) jira-events at lists.jboss.org
Wed Jan 30 05:48:00 EST 2008


     [ http://jira.jboss.com/jira/browse/JBSEAM-1633?page=all ]

Pete Muir updated JBSEAM-1633:
------------------------------

    Component/s: Test Harness

> Mock Log
> --------
>
>                 Key: JBSEAM-1633
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1633
>             Project: JBoss Seam
>          Issue Type: Feature Request
>          Components: Test Harness
>            Reporter: Bruno Bieth
>            Priority: Minor
>         Attachments: MockLog.java
>
>
> 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