SimpleLog/SimpleLog.Tests/LoggerManagerTest.cs

29 lines
758 B
C#

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