cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SANSONE, AARON M [Non-Pharmacia/1000]" <>
Subject JUnit Testing Actions with Logging...
Date Fri, 19 Oct 2001 15:51:21 GMT
Hello everyone,

In Cocoon2 has anyone successfully configured a JUnit test case that will
run an Action (or any other class) that has logging method calls in it? 

For example, I have an action that I am able to Unit test with out any
problem until I add the following (line 45):

    getLogger().debug("CheckBoxAggregateAction: parameter useCheckedValue =
" + params.getParameter("useCheckedValue", "FALSE") );

After adding this line, my JUnit tests fail with the following exception:



Apparently this is failing because I can't get a Logger.  I don't want to
create a logger in the Action and I can run the action successfully within
the Cocoon2 Framework. 
How do I setup my TestCase to create a logger so that my Unit Tests will

Thanks in advance,


Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message