|
From: <thi...@gm...> - 2005-04-25 11:17:30
|
Hi,
I wrote a mock log4net appender to ensure that my tests fails when
some errors are (sometimes silently) logged through log4net.
Sample usage (just a starter):
[SetUp]
public void SetUp()
{
=09DOMConfigurator.Configure();
=09// create a mock log4net appender to verify that no error is outputed
=09mockLog4netAppender =3D new MockLog4netAppender();
=09// expect zero errors
=09mockLog4netAppender.ExpectErrors(0);
=09mockLog4netAppender.RegisterAppender();
}
[TearDown]
public void TearDown()
{
=09// verify that no error was outputed by log4net
=09mockLog4netAppender.Verify();
}
Do you think this idea could fit inside the nmock package ? I know
it's slightly OT, but if you think it can be useful or have other
remarks, please tell me.
regards
Thibaut Barr=E8re
http://www.dotnetguru2.org/tbarrere
|