You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Curt Arnold <ca...@apache.org> on 2006/12/01 07:36:41 UTC

Re: Problem mocking log4net appender

On Nov 30, 2006, at 12:39 PM, Matt Young wrote:

> Greetings :)
>
> I encountered a problem with NMock2 (1.0.2313.18049) while attempting
> to mock a log4net (1.2.10.0) appender. The mock appender throws an
> ExpectionException when log4net calls DoAppend and then log4net eats
> the exception the test finishes.  The problem is
> VerifyAllExpectationsHaveBeenMet() does not cause the test to fail.
> Apparently the mock appender does not remember that the Expect.Never
> expectation was broken.
>
> Can anyone suggest a workaround to this problem? Thanks :)
>

Looks like this should have been posted on log4net-user, not log4cxx- 
user.