SimpleLog/SimpleLog.Tests/LoggerManagerTest.cs

29 lines
758 B
C#
Raw Normal View History

using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
namespace SimpleLog.Tests {
[TestFixture]
public class LoggerManagerTest {
2009-04-19 22:10:13 +00:00
[SetUp]
public void SetUp() {
LoggerManager.LoadConfig(null);
}
[Test]
public void TestGetLogger() {
2009-04-19 22:10:13 +00:00
DefaultLogger logger = LoggerManager.GetLogger(typeof(DefaultLogger)) as DefaultLogger;
Assert.That(logger, Is.TypeOf(typeof(DefaultLogger)));
2009-04-19 22:10:13 +00:00
DefaultLogger logger2 = LoggerManager.GetLogger(typeof(DefaultLogger)) as DefaultLogger;
Assert.That(logger2, Is.TypeOf(typeof(DefaultLogger)));
}
[Test]
[ExpectedException("System.ArgumentException")]
public void TestGetLoggerThrowsArgumentException() {
2009-04-19 22:10:13 +00:00
LoggerManager.GetLogger(typeof(object));
}
}
}