]
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: